$forEachChannel
$forEachChannel
will execute awaited commands in every channel of every guild.
Usage
$forEachChannel[time;awaitData;...awaitedCmds;endCmd]
Parameters
Field | Type | Description | Required |
---|---|---|---|
time | string | How long it takes between each channel to execute the next. | true |
awaitData | object | ||
JavaScript/Reference/Global_Objects/Object) | Awaited Data. | true | |
…awaitedCmds | string | Awaited Commands to execute. | true |
endCmd | string | Awaited Command to execute when loop ends. | true |
Example(s)
This will change the variable value of each channel to “test”:
1client.command({2 name: "forEachChannel",3 code: `4 $forEachChannel[2s;{"value": "test"};awaitedCommand;]5 `6});7
8client.awaitedCommand({9 name: "awaitedCommand",10 code: `11 $setChannelVar[varname;$awaitData[value];$channelID]12 `13});