Skip to content

$forEachUser

$forEachUser will execute awaited commands for user across all guilds.

Usage

$forEachUser[time;awaitData;...awaitedCmds;endCmd?]

Parameters

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

Example(s)

This will log every (cached) user in your console:

1
client.command({
2
name: "awaitData",
3
code: `
4
$forEachUser[1;{};returnUsers;]
5
`
6
});
7
8
client.awaitedCommand({
9
name: "returnUsers",
10
code: `
11
$log[ $authorID ]
12
`
13
});