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,
})
}
Get Channels
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
ID of the server to retrieve channels from.
Blocks to run for each channel.
Holds blocks
Outputs
Current iteration (1-based).
Example: 1
Total number of iterations.
Example: 5
ID of the channel.
Name of the channel.
Topic of the channel.
Position of the channel in the server.
Example: 3
Type of channel (Text, Voice, etc.).
Whether the channel is marked NSFW.
ID of the parent category or thread owner.
User limit for voice channels.
Example: 0
User limit for voice and stage channels.
Example: 0
Link to the channel.
Example: https://discord.com/channels/123/456
ID of the last message sent in the channel.
Comma-separated applied forum tag IDs.
Comma-separated available forum tag IDs.
Slowmode delay in seconds (0 means disabled).
Example: 0
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
get_discord_guild_channels- Loop block: write
for item := range get_discord_guild_channels(Args{...}) { ... }and read the current item's outputs fromitem. See loops.
Inputs
| Field | InventScript name | Value |
|---|---|---|
| Server ID | server_id | |
| Loop Body | body | blocks: func() { ... } |
Outputs
| Field | InventScript name | Value |
|---|---|---|
| Iteration Number | iteration_number | e.g. "1" |
| Total Iterations | total_iterations | e.g. "5" |
| Channel ID | channel_id | |
| Channel Name | channel_name | |
| Channel Topic | channel_topic | |
| Channel Position | channel_position | e.g. "3" |
| Channel Type | channel_type | |
| Channel NSFW | channel_nsfw | |
| Parent Channel ID | parent_channel_id | |
| Voice Channel Limit | voice_channel_limit | e.g. "0" |
| Channel User Limit | channel_user_limit | e.g. "0" |
| Channel Link | channel_link | e.g. "https://discord.com/channels/123/456" |
| Last Message ID | last_message_id | |
| Applied Forum Tags | applied_forum_tags | |
| Available Forum Tags | available_forum_tags | |
| Channel Slow Mode | channel_slow_mode | e.g. "0" |