APIInvite

https://discord.com/developers/docs/resources/invite#invite-object

Signature

export interface APIInvite

Properties

code: string;

The invite code (unique ID)

guild?: APIInviteGuild;

The guild this invite is for See https://discord.com/developers/docs/resources/guild#guild-object

channel: Required<APIPartialChannel> | null;

The channel this invite is for See https://discord.com/developers/docs/resources/channel#channel-object

inviter?: APIUser;

The user who created the invite See https://discord.com/developers/docs/resources/user#user-object

target_type?: InviteTargetType;

The type of target for this voice channel invite See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types

target_user?: APIUser;

The user whose stream to display for this voice channel stream invite See https://discord.com/developers/docs/resources/user#user-object

target_application?: Partial<APIApplication>;

The embedded application to open for this voice channel embedded application invite See https://discord.com/developers/docs/resources/application#application-object

approximate_presence_count?: number;

Approximate count of online members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`

approximate_member_count?: number;

Approximate count of total members, returned from the `GET /invites/<code>` endpoint when `with_counts` is `true`

expires_at?: string | null;

The expiration date of this invite, returned from the `GET /invites/<code>` endpoint when `with_expiration` is `true`