Skip to content
Variables resetChannelVar

$resetChannelVar[]

$resetChannelVar restores a channel-scoped variable to its default value defined in the Bot Creator Variables UI. If no default is defined, the stored value is removed entirely.

Syntax

bdfd
$resetChannelVar[name] or $resetChannelVar[name;Channel ID]

When called with only a name, it resets the variable for the current channel. When a Channel ID is provided, it resets the variable for the specified channel.

Use this function to clear channel-specific settings, reset counters, or restore channel defaults. After resetting, $getChannelVar returns the default value (if defined) or an empty string. This function does not return any output.

Examples

Reset Channel Variable

$resetChannelVar[topicLock;$channelID]
$title[Reset Variable]
$description[Reset `topicLock` variable for channel <#$channelID> to its default value.]
$color[#57F287]
$sendMessage[]