Interface InviteWithMetadata<CH>

Represents an invite.

interface InviteWithMetadata<CH> {
    approximateMemberCount: undefined;
    approximatePresenceCount: undefined;
    channelID: null | string;
    client: Client<ClientEvents>;
    code: string;
    createdAt: Date;
    expiresAt?: Date;
    flags: number;
    guild: null | InviteGuild;
    guildID: null | string;
    guildScheduledEvent: undefined;
    inviter?: User;
    maxAge: number;
    maxUses: number;
    roles?: InviteRole[];
    stageInstance?: InviteStageInstance;
    targetApplication?: PartialApplication;
    targetType?: InviteTargetTypes;
    targetUser?: User;
    temporary: boolean;
    type: InviteTypes;
    uses: number;
    get channel(): null | (CH extends AnyInviteChannel
        ? CH<CH>
        : PartialInviteChannel);
    deleteInvite(reason?): Promise<Invite<CH>>;
    getTargetUsers(): Promise<string[]>;
    getTargetUsersJobStatus(): Promise<InviteTargetUsersJobStatusResponse>;
    inCachedChannel(): this is Invite<AnyInviteChannel>;
    inCachedGuildChannel(): this is Invite<AnyGuildInviteChannel>;
    inDMChannel(): this is Invite<never>;
    toJSON(): JSONInvite;
    updateInviteTargetUsers(users): Promise<null>;
}

Type Parameters

Hierarchy (view full)

Properties

approximateMemberCount: undefined

The approximate number of total members in the guild this invite leads to.

approximatePresenceCount: undefined

The approximate number of online members in the guild this invite leads to.

channelID: null | string

The ID of the channel this invite leads to.

code: string

The code of this invite.

createdAt: Date

When this invite was created.

expiresAt?: Date

The date at which this invite expires.

flags: number

This invite's flags.

guild: null | InviteGuild

The guild this invite leads to or null if this invite leads to a Group DM.

guildID: null | string

The ID of the guild this invite leads to or null if this invite leads to a Group DM.

guildScheduledEvent: undefined

The scheduled event associated with this invite.

inviter?: User

The user that created this invite.

maxAge: number

The time after which this invite expires.

maxUses: number

The maximum number of times this invite can be used,

roles?: InviteRole[]

The roles assigned to the user upon accepting the invite .

stageInstance?: InviteStageInstance

Deprecated

The stage instance in the invite this channel is for.

targetApplication?: PartialApplication

The embedded application this invite will open.

targetType?: InviteTargetTypes

The target type of this invite.

targetUser?: User

The user whose stream to display for this voice channel stream invite.

temporary: boolean

If this invite only grants temporary membership.

The type of this invite.

uses: number

The number of times this invite has been used.

Accessors

Methods