RoleCheck.id constructor

RoleCheck.id(
  1. Snowflake id,
  2. {String? name}
)

Create a new RoleCheck that succeeds if the user that created the context has a role with the id id.

Implementation

RoleCheck.id(Snowflake id, {String? name})
    : roleIds = [id],
      super(
        name: name ?? 'Role Check on $id',
        (context) => context.member?.roles.any((role) => role.id == id) ?? false,
      );