Class

Ticket

Ticket(hackers, question, requesterRole, ticketNumber, ticketManager)

Constructor

# new Ticket(hackers, question, requesterRole, ticketNumber, ticketManager)

Parameters:
Name Type Description
hackers Collection.<String, User>
question String
requesterRole Role
ticketNumber Number
ticketManager TicketManager

View Source classes/tickets/ticket.js, line 33

Members

String

# static STATUS

The possible status of the ticket.
Properties:
Name Type Description
new String Ticket is open for someone to take.
closed String Ticket has been dealt with and is closed.
taken String Ticket is being handled by someone.

View Source classes/tickets/ticket.js, line 425

TicketConsoles

# consoles

All the consoles sent out. GroupLeader -> sent via DM to leader, they can cancel the ticket from there ticketManager -> sent to the helper channel ticketRoom -> sent to the ticket room once created for users to leave

View Source classes/tickets/ticket.js, line 78

TicketGarbageInfo

# garbageCollectorInfo

Garbage collector info.

View Source classes/tickets/ticket.js, line 88

Collection.<String, User>

# group

All the group members, group leader should be the first one!

View Source classes/tickets/ticket.js, line 63

Collection.<String, User>

# helpers

Mentors who join the ticket

View Source classes/tickets/ticket.js, line 69

Number

# id

Ticket number

View Source classes/tickets/ticket.js, line 39

String

# question

Question from hacker

View Source classes/tickets/ticket.js, line 51

Role

# requestedRole

View Source classes/tickets/ticket.js, line 56

Room

# room

The room this ticket will be solved in.

View Source classes/tickets/ticket.js, line 45

Ticket.STATUS

# status

The status of this ticket

View Source classes/tickets/ticket.js, line 98

Methods

# async basicTakenStatusCallback(helper)

Callback for status change to taken when ticket manager is NOT in advanced mode.
Parameters:
Name Type Description
helper User the user who is taking the ticket

View Source classes/tickets/ticket.js, line 219

# async includeExclude(exclude)

This function is called by the ticket's Cave class to change its status between include/exclude for automatic garbage collection. If a previously excluded ticket is re-included, the bot starts listening for inactivity as well.
Parameters:
Name Type Description
exclude Boolean true if ticket is now excluded from garbage collection, false if not

View Source classes/tickets/ticket.js, line 111

# async setStatus(status, reasonopt, useropt)

Change the status of this ticket.
Parameters:
Name Type Attributes Description
status String one of Ticket.STATUS
reason String <optional>
the reason for the change
user User <optional>
user involved with the status change

View Source classes/tickets/ticket.js, line 130