Skip to content

$forEachGuildChannel

$forEachGuildChannel will execute awaited commands in every channel of the current guild.

Usage

$forEachGuildChannel[time;awaitData;...awaitedCmds;endCmd]

Parameters

FieldTypeDescriptionRequired
timestringHow long it takes between each channel to execute the next.true
awaitDataobjectAwaited Data.true
…awaitedCmdsstringAwaited Commands to execute.true
endCmd?stringAwaited Command to execute when the loop ends.false

Example(s)

This will change the variable value of each guild channel to “test”:

1
client.command({
2
name: "forEachGuildChannel",
3
code: `
4
$forEachGuildChannel[2s;{"value": "test"};awaitedCommand;]
5
`
6
});
7
8
client.awaitedCommand({
9
name: "awaitedCommand",
10
code: `
11
$setChannelVar[varname;$awaitData[value];$channelID]
12
`
13
});