createChannelInvite
General
createChannelInvite creates a new guild invite with the given landing channel where new members would see when they first join the guild.
Usage
Client:createChannelInvite(<string> channelId, (array) options, (string) reason)
Returns: <Invite> Invite
Options may contain the following:
(boolean) temporary - Controls whether members who joined using the invite shall be kicked after 24 hours if they have not been assigned a role.
(number) maxAge - Controls how long the invite should last. (in seconds, enter 0 if for forever)
(number) maxUses - Controls the maximum amount of uses.
(boolean) unique - Controls whether the invite should be a new one, or an existing one with similar settings.
Limitations
See discordChannel PATCH.
Example
local invite = Client:createChannelInvite("569166849099694093")
print(invite.code)