Invite
- class Invite()
A Discord invite and any metadata returned for it by the current endpoint. Count, expiration, and inviter-related fields may be absent depending on how the invite was obtained and which options were requested.
exported from
lib.weeble.dProperties
- Invite.approximateMemberCount
-
Approximate member count at the time the invite was fetched, or
null.
- Invite.approximatePresenceCount
-
Approximate online member count, or
null.
- Invite.channel
type: readonly
InviteChannel| nullPartial target channel information included with the invite.
- Invite.guild
type: readonly
InviteGuild| nullPartial target guild information included with the invite.
- Invite.maxUses
-
Maximum number of uses.
0means unlimited;nullmeans Discord omitted the field.
- Invite.targetApplication
type: readonly Record<string, unknown> | null
Target application metadata when Discord includes it.
- Invite.targetType
-
Type of invite target, or
nullfor an ordinary channel invite.
- Invite.targetUser
-
Target user for stream or embedded-application invites.
- Invite.temporary
-
Indicates whether this invite grants temporary membership, or
null.
Methods
- async Invite.delete(reason: string) Promise<void>
Delete this invite.
- Parameters:
reason — – Audit-log reason for deleting the invite.
-
async Invite.fetch() Promise<
Invite> Refetch the latest invite data from Discord.
- Returns:
The updated invite object.
-
async Invite.fetchChannel() Promise<
GuildTextChannel|GuildVoiceChannel| null> Fetch the complete channel this invite targets through Discord REST. Deployment guild isolation applies. Use
invite.channelfor the public partial channel included with external invite responses.- Returns:
The channel, or null if not available.