Skip to content

$onlyForGuilds

$onlyForGuilds will check if the command was executed in one of the listed guilds and return a error message if not.

Usage

$onlyForGuilds[...guildIds;error]

Parameters

FieldTypeDescriptionRequired
…guildIdsstring, numberGuilds you want to limit the command to.true
errorstringError to return when the command was not executed in any of the listed guilds.true

Example(s)

This will limit the command only to the listed guilds:

1
client.command({
2
name: "onlyForGuilds",
3
code: `
4
Ok.
5
$onlyForGuilds[guildID;guildID;You can't use that command here!]
6
`
7
});