$rulesChannelID
Returns the servers rule channel’s ID (*returns an error if there isn’t such a channel“)
Syntax
$rulesChannelID[(Guild ID)]
Parameters
Guild ID
(Type: Snowflake || Flag: Optional)
: The guild to get the rule channel’s ID.
Example
$nomention
Rule channel's ID: $rulesChannelID[$guildID]
The $rulesChannelID[]
function as said in above returns an error if there isn’t any rule channel set on the server and there is a way to stop that.
$nomention
$try
Rule channel's ID: $ruleChannelID[$guildID]
$catch
No rule channel found!
$endtry
- Without try block:
$rulesChannelID
at 2:33
returned an error: No rule channel set in this server!
- With try block:
For more information, read the Error Handling guide.