$channel
Retrieves information about a specific channel.
Usage:
$channel[Channel ID;Option]
Parameters:
- Channel ID: The ID of the channel you want to get information from.
- Option: The specific piece of information you want to retrieve about the channel. See the list below for available options.
Available Options:
The Option
parameter determines what information $channel
returns. Here's a breakdown of the available options:
name
: The name of the channel.id
: The ID of the channel.isdeleted
: Returnstrue
if the channel is deleted, otherwisefalse
.mention
: Returns the channel mention (e.g.,<#1234567890>
).position
: The channel's position in the channel list (numerical).rawposition
: The raw position of the channel, unaffected by sorting.topic
: The channel topic (if applicable, e.g., for text channels).type
: The type of channel (See Note below).created
: The timestamp of when the channel was created (Unix timestamp).timestamp
: Alias forcreated
. Returns the timestamp when the channel was created (Unix timestamp).guildid
: The ID of the guild (server) the channel belongs to.guildname
: The name of the guild (server) the channel belongs to.ismanageable
: Returnstrue
if the bot can manage the channel, otherwisefalse
.parentid
: The ID of the parent category (if applicable).parentname
: The name of the parent category (if applicable).isviewable
: Returnstrue
if the bot can view the channel, otherwisefalse
.isdeletable
: Returnstrue
if the bot can delete the channel, otherwisefalse
.
Example:
This example retrieves the name of the channel with the ID stored in the variable $channelID
.
Note
The type
option returns the channel's type. Refer to this list for possible channel types.