BaseTicketManager

The base ticket manager class.

Constructor

new BaseTicketManager(client, options)

The constructor of the base ticket manager class.

Parameters:
NameTypeDescription
clientClient

The client

optionsBaseTicketManagerOptions

The options of the base ticket manager

Members

client :Client

The client

Type:
  • Client

isReady :Boolean

If the tickets are loaded.

Type:
  • Boolean

options :BaseTicketManagerOptions

The options of the base ticket manager

Methods

checkDoubleTickets(guildId, userId) → {Promise.<Boolean>}

Checks if a user has multiple tickets

Parameters:
NameTypeDescription
guildIdSnowflake

The id of the guild

userIdSnowflake

The id of the user

Returns:
Type: 
Promise.<Boolean>

resolveGuild(guild) → {Guild|null}

Resolves a guild

Parameters:
NameTypeDescription
guildGuildResolvable

The guild to resolve

Returns:
Type: 
Guild | null

resolveUser(user) → {User|null}

Resolves a user

Parameters:
NameTypeDescription
userUserResolvable

The user to resolve

Returns:
Type: 
User | null

save() → {Boolean|DisGroupDevError}

Saves the ticket to the json file

Returns:
Type: 
Boolean | DisGroupDevError