Skip to content

$setChannelVar

$setChannelVar will change the value of a given channel variable.

Usage

$setChannelVar[varname;value;channelID?;table?]

Parameters

FieldTypeDescriptionRequired
varnamestringVariable name.true
valuestringNew Variable value.true
channelID?numberChannel ID.false
table?stringVariable table.false

Example(s)

This will change the value of “Example” to “This is a value”:

1
client.command({
2
name: "setChannelVar",
3
code: `
4
$setChannelVar[Example;This is a value;$channelID;main]
5
`
6
});