Skip to content

$createChannelInvite

$createChannelInvite will create a channel invite.

Usage

$createChannelInvite[channelID?;...options]

Parameters

FieldTypeDescriptionRequired
channelID?numberThe channel ID of which the invite will be created.false
options?objectInvite options.false

Invite Target Types

TYPE VALUE
STREAM 1
EMBEDDED_APPLICATION 2

Example(s)

This will create an invite of the channel where the command is executed in:

1
client.command({
2
name: "createChannelInvite",
3
code: `
4
$createChannelInvite[$channelID]
5
`
6
});

Advanced Example(s)

Create Temporary Invites with limited uses:

1
client.command({
2
name: "createChannelInvite",
3
code: `
4
$createChannelInvite[$channelID;{
5
"temporary": true,
6
"maxAge": 650,
7
"maxUses": 25,
8
"unique": true
9
}]
10
`
11
});

Create Activity Invites:

1
client.command({
2
name: "createChannelInvite",
3
code: `
4
$createChannelInvite[voiceID;{
5
"targetApplication": "application ID",
6
"targetType": 2
7
}]
8
`
9
});