GuildCheck class Null safety

A Check that checks for a specific guild.

This check is treated specially by CommandsPlugin:

  • There can only be one GuildCheck per command
  • Commands will be registered as guild commands in the specified guilds. This overrides CommandsPlugin.guild
Inheritance

Constructors

GuildCheck(IGuild guild, [String? name])
Create a Guild Check based on a guild.
GuildCheck.all([String? name])
Create a Guild Check that allows all guilds, but denies DMs. [...]
GuildCheck.any(Iterable<IGuild> guilds, [String? name])
Create a Guild Check based on multiple guilds.
GuildCheck.anyId(Iterable<Snowflake> ids, [String? name])
Create a Guild Check based on multiple guild ids.
GuildCheck.id(Snowflake id, [String? name])
Create a Guild Check based on a guild id.
GuildCheck.none([String? name])
Create a Guild Check that allows no guilds. [...]

Properties

guildIds Iterable<Snowflake?>
The guilds this check allows. [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
name String
The name of the check
final, inherited
permissions Future<Iterable<CommandPermissionBuilderAbstract>>
An Iterable of permission overrides that will be used on slash commands using this check.
read-only, inherited
postCallHooks Iterable<void Function(Context context)>
An Iterable of post-call hooks that will be called when a command this check is on emits to Command.onPostCall. [...]
read-only, inherited
preCallHooks Iterable<void Function(Context context)>
An Iterable of pre-call hooks that will be called when a command this check is on emits to Command.onPreCall. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

check(Context context) FutureOr<bool>
The method called to validate this check. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited