Functionalities
Other
$channelTopic
Returns the topic of the channel the command was executed in or in a channel of the defined channel ID. Returns 'undefined' if no topic was found.

FUNCTION USAGE

  • $channelTopic
  • $channelTopic[]
  • $channelTopic[channelID]

Properties:

[] - Returns the channel topic of the channel the command is executed in. Same as no brackets. channelID - Returns the channel topic of the channel of the supplied channel ID.
  • Bot must be in the server to read the data!
  • Now reads channel data globally!

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

1
bot.Command({
2
name: "thischannel-topic",
3
code: `
4
$channelTopic
5
`
6
})
Copied!

Example 1: Returns the channel topic of a specific channel. Otherwise, bot returns the current channel topic.

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