Get Channels

LoopChannels

Retrieve a Discord server's channels by its ID.

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

Inputs

Server IDRequired

ID of the server to retrieve channels from.

Loop Body

Blocks to run for each channel.

Holds blocks

Outputs

Iteration Number

Current iteration (1-based).

Example: 1

Total Iterations

Total number of iterations.

Example: 5

Channel ID

ID of the channel.

Channel Name

Name of the channel.

Channel Topic

Topic of the channel.

Channel Position

Position of the channel in the server.

Example: 3

Channel Type

Type of channel (Text, Voice, etc.).

Channel NSFW

Whether the channel is marked NSFW.

Parent Channel ID

ID of the parent category or thread owner.

Voice Channel Limit

User limit for voice channels.

Example: 0

Channel User Limit

User limit for voice and stage channels.

Example: 0

Channel Link

Link to the channel.

Example: https://discord.com/channels/123/456

Last Message ID

ID of the last message sent in the channel.

Applied Forum Tags

Comma-separated applied forum tag IDs.

Available Forum Tags

Comma-separated available forum tag IDs.

Channel Slow Mode

Slowmode delay in seconds (0 means disabled).

Example: 0

Build a bot using blocks like Get Channels

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_discord_guild_channels
  • Loop block: write for item := range get_discord_guild_channels(Args{...}) { ... } and read the current item's outputs from item. See loops.

Inputs

FieldInventScript nameValue
Server IDserver_id
Loop Bodybodyblocks: func() { ... }

Outputs

FieldInventScript nameValue
Iteration Numberiteration_numbere.g. "1"
Total Iterationstotal_iterationse.g. "5"
Channel IDchannel_id
Channel Namechannel_name
Channel Topicchannel_topic
Channel Positionchannel_positione.g. "3"
Channel Typechannel_type
Channel NSFWchannel_nsfw
Parent Channel IDparent_channel_id
Voice Channel Limitvoice_channel_limite.g. "0"
Channel User Limitchannel_user_limite.g. "0"
Channel Linkchannel_linke.g. "https://discord.com/channels/123/456"
Last Message IDlast_message_id
Applied Forum Tagsapplied_forum_tags
Available Forum Tagsavailable_forum_tags
Channel Slow Modechannel_slow_modee.g. "0"

Example InventScript

for guildChannel := range get_discord_guild_channels(Args{server_id: trigger.server_id}) {
	send_text_message(Args{
		channel_id:      trigger.channel_id,
		message_content: "Channel ID: " + guildChannel.channel_id,
	})
}

More channels blocks