Skip to content
Control Flow onlyForGuilds

$onlyForGuilds — Only executes code if given ids match the guild

Only executes code if given ids match the guild

Syntax

$onlyForGuilds[code;guilds...]

Parameters

  • code (text, required) — The code to execute if guild is not whitelisted
  • guilds… (id, required) — The guilds to check for

Return Value

  • String.

Usage

$onlyForGuilds[code;guilds...] → result

Example

$sendMessage[$onlyForGuilds[ok;10]]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.