Functionalities
Other
$channelID
Returns the channel ID of the channel the command is executed in or of an existing channel in a guild your bot can read.

FUNCTION USAGE

  • $channelID
  • $channelID[]
  • $channelID[name]

Properties:

[] - Returns the channel ID of the channel the command is executed in. Same as no brackets. name - Returns the channel ID of the supplied channel name.
  • Bot must be in the server to read the data!
  • Now reads channel data globally! If you have a channel with the same name as another guild, the bot will read the channel in your guild first.

Example 1: Returns the channel ID of where the command was executed

1
bot.Command({
2
name: "thischannel",
3
code: `
4
<#$channelID>
5
`
6
})
Copied!

Example 1: Returns the channel ID of main-chat if it exists. Otherwise, bot returns the current channelID.

1
bot.Command({
2
name: "channel",
3
code: `
4
$channelID[main-chat]
5
`
6
})
Copied!
Last modified 5mo ago
Copy link
Contents
Properties: