$channelName

Returns the channel's name.

Usage

$channelName or $channelName[channelID]

This function has one param.

ParamDescriptionTypeRequired

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\``
})

Last updated