Class

TicketManager

TicketManager(parent, args)

Represents a real life ticket system that can be used in any setting. It is very versatile so it can be used with one or many helper types, can edit options, embeds, etc.
Constructor

# new TicketManager(parent, args)

Parameters:
Name Type Description
parent Activity
args Object
ticketCreatorInfo TicketCreatorInfo
ticketDispatcherInfo TicketDispatcherInfo
systemWideTicketInfo SystemWideTicketInfo

View Source classes/tickets/ticket-manager.js, line 17

Members

# multiRoleInfo

Information about the system being multi role, if its the case, it needs a Multi Role Selector.

View Source classes/tickets/ticket-manager.js, line 137

Activity

# parent

The parent of this ticket-system. It must be paired with a cave or an activity.

View Source classes/tickets/ticket-manager.js, line 92

# ticketCount

The number of tickets created. Must be separate as tickets.length since we use this to assign IDs to tickets.

View Source classes/tickets/ticket-manager.js, line 86

Collection.<Number, Ticket>

# tickets

The tickets in this ticket system.

View Source classes/tickets/ticket-manager.js, line 80

Methods

# addTicketType(role, typeName, emoji)

Adds a new type of ticket, usually a more focused field, there must be a role associated to this new type of ticket.
Parameters:
Name Type Description
role Role role to add
typeName String
emoji GuildEmoji | ReactionEmoji

View Source classes/tickets/ticket-manager.js, line 187

# getTicketCount() → {Number}

Return the number of tickets in this ticket system.

View Source classes/tickets/ticket-manager.js, line 274

Number

# removeAllTickets(excludeTicketIdsopt)

Removes all the tickets from this ticket manager.
Parameters:
Name Type Attributes Default Description
excludeTicketIds Array.<Number> <optional>
[] tickets to be excluded

View Source classes/tickets/ticket-manager.js, line 282

# removeTicket(ticketId)

Removes a ticket, deletes the ticket's channels too!
Parameters:
Name Type Description
ticketId Number the ticket id to remove

View Source classes/tickets/ticket-manager.js, line 326

# removeTicketsByAge(minAge)

Removes all tickets older than the given age.
Parameters:
Name Type Description
minAge Number the minimum age in minutes

View Source classes/tickets/ticket-manager.js, line 308

Error when used and advanced mode is turned off

# removeTicketsById(ticketIds)

Removes tickets by their ids
Parameters:
Name Type Description
ticketIds Array.<Number> ticket ids to remove

View Source classes/tickets/ticket-manager.js, line 297

# async sendTicketCreatorConsole(title, description, coloropt)

Sends the ticket creator console.
Parameters:
Name Type Attributes Description
title String the ticket creator console title
description String the ticket creator console description
color String <optional>
the ticket creator console color, hex

View Source classes/tickets/ticket-manager.js, line 163

# async startTicketCreationProcess(user, role, channel)

Prompts a user for more information to create a new ticket for them.
Parameters:
Name Type Description
user User the user creating a ticket
role Role
channel TextChannel | DMChannel

View Source classes/tickets/ticket-manager.js, line 207