RoleCheck.anyId constructor

RoleCheck.anyId(
  1. Iterable<Snowflake> roles,
  2. {String? name}
)

Create a new RoleCheck that succeeds if the user that created the context has any role for which the role's id is in roles.

Implementation

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