invite := create_invite(Args{channel_id: trigger.channel_id})
send_text_message(Args{
channel_id: trigger.channel_id,
message_content: "Invite Code: " + invite.invite_code,
})
Inputs
ID of the channel to create the invite for.
Maximum number of times the invite can be used. Set to 0 or leave blank for unlimited.
Whether the invite is temporary. Set to true for the invite to be temporary.
Example: false
Number of seconds until the invite expires. Set to 0 for never, or leave blank for default (7 days).
Example: 604800
Whether the invite should be unique. Set to true for the invite to be unique.
Outputs
Code for the created invite.
ID of the server for the invite.
ID of the channel for the invite.
Name of the channel.
User ID of the invite creator.
Username of the invite creator.
Number of times the invite has been used.
Maximum number of times the invite can be used.
Whether the invite is temporary.
Unix timestamp when the invite expires.
Unix timestamp when the invite was created.
Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.
Advanced Documentation
This documentation can be useful when using code mode. View as Markdown
create_inviteInputs
| Field | InventScript name | Value |
|---|---|---|
| Channel ID | channel_id | |
| Max Uses | max_uses | |
| Temporary | temporary | e.g. "false" |
| Expires After (Seconds) | expires_after_seconds | e.g. "604800" |
| Unique | unique | "true", "false" |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Invite Code | invite_code | |
| Server ID | server_id | |
| Channel ID | channel_id | |
| Channel Name | channel_name | |
| Invite Creator User ID | invite_creator_user_id | |
| Invite Creator Username | invite_creator_username | |
| Invite Uses | invite_uses | |
| Invite Max Uses | invite_max_uses | |
| Invite Temporary | invite_temporary | |
| Expires At (Unix) | expires_at_unix | |
| Invite Created At (Unix) | invite_created_at_unix |