class GuildInviteManager
extends
DataManager<string, Invite, InviteResolvable>export class GuildInviteManager extends DataManager<string, Invite, InviteResolvable>
Manages API methods for GuildInvites and stores their cache.
readonlyCollection<string, Invite> cache :
The cache of items for this manager.
Inherited from: DataManager
Guild guild :
The guild this Manager belongs to
readonlyConstructable<Invite> holds :
The data structure belonging to this manager.
Inherited from: DataManager
createchannel: 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);
deleteinvite: InviteResolvablereason?: string) : Promise<Invite> (
invite: InviteResolvable
reason?: string
Deletes an invite.
Overload 1
Overload 2
fetchoptions: 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);
resolveinvite: InviteResolvable) : Invite | null (
invite: InviteResolvable
Resolves an InviteResolvable to an Invite object.
resolveIdinvite: InviteResolvable) : string | null (
invite: InviteResolvable
Resolves an InviteResolvable to an invite code string.
valueOfCollection<string, Invite> () :
Inherited from: DataManager