Constructor
new TextTicketManager(client, options)
The constructor of the text ticket manager class.
Name | Type | Description |
---|---|---|
client | Client | The client |
options | TextTicketManagerOptions | The options of the text ticket manager |
Extends
Members
cache :Collection.<Number, TextTicket>
The cache with all text tickets
- Collection.
<Number, TextTicket>
client :Client
The client
- Client
- Overrides
isReady :Boolean
If the tickets are loaded.
- Boolean
- Overrides
options :TextTicketManagerOptions
The options of the text ticket manager
- Overrides
Methods
checkDoubleTickets(guildId, userId) → {Promise.<Boolean>}
Checks if a user has multiple tickets
Name | Type | Description |
---|---|---|
guildId | Snowflake | The id of the guild |
userId | Snowflake | The id of the user |
- Overrides
- Type:
- Promise.
<Boolean>
closeTicket(ticket) → {Promise.<(TextTicket|DisGroupDevError)>}
Closes a ticket
Name | Type | Description |
---|---|---|
ticket | TextTicket | The text ticket you want to close |
- Type:
- Promise.
<(TextTicket| DisGroupDevError)>
createTicket(guild, user) → {Promise.<(TextTicket|DisGroupDevError)>}
Creates a ticket for a user
Name | Type | Description |
---|---|---|
guild | GuildResolvable | The guild of the ticket |
user | UserResolvable | The user who created the ticket |
- Type:
- Promise.
<(TextTicket| DisGroupDevError)>
deleteTicket(ticket) → {Promise.<(Boolean|DisGroupDevError)>}
Deletes a ticket
Name | Type | Description |
---|---|---|
ticket | TextTicket | The ticket to delete |
- Type:
- Promise.
<(Boolean| DisGroupDevError)>
renameTicket(ticket, name) → {Promise.<(TextTicket|DisGroupDevError)>}
Renames a ticket
Name | Type | Description |
---|---|---|
ticket | TextTicket | The ticket to rename |
name | String | The new name of the ticket |
- Type:
- Promise.
<(TextTicket| DisGroupDevError)>
reopenTicket(ticket) → {Promise.<(TextTicket|DisGroupDevError)>}
Reopens a ticket
Name | Type | Description |
---|---|---|
ticket | TextTicket | The ticket to reopen |
- Type:
- Promise.
<(TextTicket| DisGroupDevError)>
resolveGuild(guild) → {Guild|null}
Resolves a guild
Name | Type | Description |
---|---|---|
guild | GuildResolvable | The guild to resolve |
- Overrides
- Type:
- Guild |
null
resolveUser(user) → {User|null}
Resolves a user
Name | Type | Description |
---|---|---|
user | UserResolvable | The user to resolve |
- Overrides
- Type:
- User |
null
save() → {Boolean|DisGroupDevError}
Saves the ticket to the json file
- Overrides
- Type:
- Boolean |
DisGroupDevError
Events
ticketClose
Emitted when a ticket is closed
Name | Type | Description |
---|---|---|
ticket | TextTicket |
ticketCreate
Emitted when a ticket is created
Name | Type | Description |
---|---|---|
ticket | TextTicket |
ticketDelete
Emitted when a ticket is deleted
Name | Type | Description |
---|---|---|
ticket | TextTicket |
ticketRename
Emitted when a ticket is renamed
Name | Type | Description |
---|---|---|
ticket | TextTicket |
ticketReopen
Emitted when a ticket is reopened
Name | Type | Description |
---|---|---|
ticket | TextTicket |