Constructor
# new TicketManager(parent, args)
Parameters:
Name | Type | Description |
---|---|---|
parent |
Activity | |
args |
Object | |
ticketCreatorInfo |
TicketCreatorInfo | |
ticketDispatcherInfo |
TicketDispatcherInfo | |
systemWideTicketInfo |
SystemWideTicketInfo |
Members
# multiRoleInfo
Information about the system being multi role, if its the case, it needs a
Multi Role Selector.
# ticketCount
The number of tickets created.
Must be separate as tickets.length since we use this to assign IDs to tickets.
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 |
# removeAllTickets(excludeTicketIdsopt)
Removes all the tickets from this ticket manager.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
excludeTicketIds |
Array.<Number> |
<optional> |
[] | tickets to be excluded |
# removeTicket(ticketId)
Removes a ticket, deletes the ticket's channels too!
Parameters:
Name | Type | Description |
---|---|---|
ticketId |
Number | the ticket id to remove |
# removeTicketsByAge(minAge)
Removes all tickets older than the given age.
Parameters:
Name | Type | Description |
---|---|---|
minAge |
Number | the minimum age in minutes |
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 |
# 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 |
# 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 |