Functionalities
Other
$findChannel
Returns the ID of a channel with the provided ID/name/mention. Define the 2nd field as `mention` to return the ID as a mention. If the bot cannot find a valid channel, function returns `undefined`.

FUNCTION USAGE

  • $findChannel[channel]
  • $findChannel[channel;mention]
  • $findChannel[channel;name]

Properties:

channel - Define a channel to return it's ID. Can be name, ID or mention mention - Type the word mention to have the bot mention the channel instead of returning the ID. name - Type the word name to have the bot return the channel name instead of returning the ID.

Example 1: If the arguments you supply is an existing channel, the bot will get that channelID, if not, the bot will return undefined.

1
bot.Command({
2
name: "test",
3
code: `
4
$findChannel[$message[]]
5
`
6
})
Copied!

Example 2: Type the word mention in the 2nd field to return the channel mention.

1
bot.Command({
2
name: "test",
3
code: `
4
$findChannel[$message[];mention]
5
`
6
})
Copied!

Example 3: Type the word name in the 2nd field to return the channel name.

1
bot.Command({
2
name: "test",
3
code: `
4
$findChannel[$message[];name]
5
`
6
})
Copied!
Last modified 9mo ago
Copy link
Contents
Properties: