Entity Info
channelNames
$channelNames
The $channelNames function returns the complete list of names of all channels on the server, joined by the separator you provide.
Syntax
$channelNames[separator;(guildID)]
Parameters
| Parameter | Description |
|---|---|
separator |
Required. The text inserted between each channel name. |
guildID |
Optional. The ID of the server to list. Defaults to the current server; an invalid ID raises Invalid guild ID. |
Return value
| Type | Description |
|---|---|
string |
All channel names concatenated with the chosen separator. |
Examples
Simple list
$sendMessage[**Server channels:** $channelNames[, ]]
List with newlines
$sendMessage[**List of channels:**
$channelNames[
]]
List with custom separator
$sendMessage[Channels: $channelNames[ | ]]
Count channels by name
$sendMessage[The server has $channelCount channels: $channelNames[, ]]
Notes
- Categories are included in the list.
- Active threads are not included.
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.