Functionalities
Other
$channelType
Returns the type of channel the command was executed in or provide a channelID for that channel type.

FUNCTION USAGE

  • $channelType
  • $channelType[]
  • $channelType[channelID]

Output:

  • dm - a DM channel
  • text - a guild text channel
  • voice - a guild voice channel
  • category - a guild category channel
  • news - a guild news channel
  • store - a guild store channel
  • unknown - a generic channel of unknown type
  • undefined - If the channel type is invalid or channel does not exist.

Properties:

[] - Returns the channel type of the channel the command is executed in. Same as no brackets. channelID - Returns the channel type 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 type of where the command was executed

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

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

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