Get Channel Invites

LoopInvites

Retrieve a list of invites for a channel.

  • Loop block: the blocks placed inside it run once for each item, and can use the current item's outputs.

Inputs

Channel IDRequired

ID of the channel to retrieve invites for.

Loop Body

Blocks to run for each invite.

Holds blocks

Outputs

Iteration Number

Current iteration (1-based).

Example: 1

Total Iterations

Total number of iterations.

Example: 3

Invite Code

Code for the invite.

Server ID

ID of the server for the invite.

Channel ID

ID of the channel for the invite.

Channel Name

Name of the channel.

Invite Creator User ID

User ID of the invite creator.

Invite Creator Username

Username of the invite creator.

Invite Uses

Number of times the invite has been used.

Invite Max Uses

Maximum number of times the invite can be used.

Invite Temporary

Whether the invite is temporary.

Expires At (Unix)

Unix timestamp when the invite expires.

Invite Created At (Unix)

Unix timestamp when the invite was created.

Build a bot using blocks like Get Channel Invites

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

ID: get_invites
  • Loop block: write for item := range get_invites(Args{...}) { ... } and read the current item's outputs from item. See loops.

Inputs

FieldInventScript nameValue
Channel IDchannel_id
Loop Bodybodyblocks: func() { ... }

Outputs

FieldInventScript nameValue
Iteration Numberiteration_numbere.g. "1"
Total Iterationstotal_iterationse.g. "3"
Invite Codeinvite_code
Server IDserver_id
Channel IDchannel_id
Channel Namechannel_name
Invite Creator User IDinvite_creator_user_id
Invite Creator Usernameinvite_creator_username
Invite Usesinvite_uses
Invite Max Usesinvite_max_uses
Invite Temporaryinvite_temporary
Expires At (Unix)expires_at_unix
Invite Created At (Unix)invite_created_at_unix

Example InventScript

for invite := range get_invites(Args{channel_id: trigger.channel_id}) {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "Invite Code: " + invite.invite_code,
	})
}

More invites blocks