class GuildInviteManager
extends
DataManager<string, Invite, InviteResolvable>export class GuildInviteManager extends DataManager<string, Invite, InviteResolvable>Manages API methods for GuildInvites and stores their cache.
readonlycache : Collection<string, Invite>
The cache of items for this manager.
Inherited from: DataManager
guild : Guild
The guild this Manager belongs to
readonlyholds : Constructable<Invite>
The data structure belonging to this manager.
Inherited from: DataManager
create(channel: GuildInvitableChannelResolvableoptions?: InviteCreateOptions) : Promise<Invite>
channel: GuildInvitableChannelResolvable
options?: InviteCreateOptions
Create an invite to the guild from the provided channel.
Examples:
// Create an invite to a selected channel
guild.invites.create('599942732013764608')
.then(console.log)
.catch(console.error); delete(invite: InviteResolvablereason?: string) : Promise<Invite>
invite: InviteResolvable
reason?: string
Deletes an invite.
Overload 1
Overload 2
fetch(options: InviteResolvable | FetchInviteOptions) : Promise<Invite>
options: InviteResolvable | FetchInviteOptions
Fetches invite(s) from Discord.
Examples:
// Fetch all invites from a guild
guild.invites.fetch()
.then(console.log)
.catch(console.error);// Fetch all invites from a guild without caching
guild.invites.fetch({ cache: false })
.then(console.log)
.catch(console.error);// Fetch all invites from a channel
guild.invites.fetch({ channelId: '222197033908436994' })
.then(console.log)
.catch(console.error);// Fetch a single invite
guild.invites.fetch('bRCvFy9')
.then(console.log)
.catch(console.error);// Fetch a single invite without checking cache
guild.invites.fetch({ code: 'bRCvFy9', force: true })
.then(console.log)
.catch(console.error)// Fetch a single invite without caching
guild.invites.fetch({ code: 'bRCvFy9', cache: false })
.then(console.log)
.catch(console.error); resolve(invite: InviteResolvable) : Invite | null
invite: InviteResolvable
Resolves an InviteResolvable to an Invite object.
resolveId(invite: InviteResolvable) : string | null
invite: InviteResolvable
Resolves an InviteResolvable to an invite code string.
valueOf() : Collection<string, Invite>
Inherited from: DataManager