$channelName

Returns the channel's name.

Usage

$channelName or $channelName[channelID]

This function has one param.

Param
Description
Type
Required

channelID

The channel ID to return the channel name for. *

Snowflake

No

* If channelID isn't provided, then the current channel name is returned.

Example

bot.commands.add({
  type: "basicCommand",
  name: "example",
  code: `The current channel name is \`$channelName\``
})
Result

Last updated

Was this helpful?