$getServerInvite

Creates and returns a server's invite URL.

Usage

$getServerInvite[guildID]

This function has one param.

ParamDescriptionTypeRequired

guildID

The server to create the invite in.

Snowflake

Yes

Your bot must have the CREATE_INSTANT_INVITE permission in the provided guild for this function to work.

Example

bot.commands.add({
    type: "basicCommand",
    name: "example",
    code: `$getServerInvite[$guildID]` //Returns the current server's invite
})

Last updated