Skip to content
GitHub

GuardOptions

interface in meocord/interface Since 4.1.0

interface GuardOptions

What @Guard takes: the context types the guard runs for.

Members

types

types?: readonly ExecutionContextType[]

The context types the guard runs for, as ExecutionContext.getType() reports them; it is skipped for any other call. A subclass inherits them unless it declares its own. A global guard also runs before @On handlers, so one that reads an interaction declares ['interaction'].

Default: every type

See also

  • Guard