RESTPostAPIChannelInviteJSONBody

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

Signature

export interface RESTPostAPIChannelInviteJSONBody

Properties

max_age?: number | undefined;

Duration of invite in seconds before expiry, or 0 for never

@default86400 (24 hours)
max_uses?: number | undefined;

Max number of uses or 0 for unlimited

@default0
temporary?: boolean | undefined;

Whether this invite only grants temporary membership

@defaultfalse
unique?: boolean | undefined;

If true, don't try to reuse a similar invite (useful for creating many unique one time use invites)

@defaultfalse
target_type?: InviteTargetType | undefined;

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

target_user_id?: Snowflake | undefined;

The id of the user whose stream to display for this invite - Required if `target_type` is 1 - The user must be streaming in the channel

target_application_id?: Snowflake | undefined;

The id of the embedded application to open for this invite - Required if `target_type` is 2 - The application must have the `EMBEDDED` flag

target_users_file?: Blob | undefined;

A csv file with a single column of user IDs for all the users able to accept this invite - Requires multipart/form-data as the content type with other parameters as form fields in the multipart body. - Requires the MANAGE_GUILD permission. - Uploading a file with invalid user IDs will result in a 400 with the invalid IDs described.

role_ids?: Snowflake[] | undefined;

the role ID(s) for roles in the guild given to the users that accept this invite