revbot.js
    Preparing search index...

    Class BitField

    Represents a bitfield that can be used to manage flags or permissions.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    bitfield: number = DEFAULT_BIT
    FLAGS: Record<string, number> = {}

    Accessors

    • get self(): {
          FLAGS: Record<string, number>;
          resolve(bit: BitFieldResolvable): number;
          new (bits?: BitFieldResolvable): BitField;
      }

      Returns the class that this instance belongs to.

      Returns {
          FLAGS: Record<string, number>;
          resolve(bit: BitFieldResolvable): number;
          new (bits?: BitFieldResolvable): BitField;
      }

      The class of the bitfield.

    Methods

    • Checks if any of the bits in the bitfield are set.

      Parameters

      • bit: BitFieldResolvable

        The bitfield or array of bitfields to check.

      Returns boolean

      True if any bits are set, false otherwise.

    • Resolves a bitfield or an array of bitfields into a single number.

      Parameters

      • bit: BitFieldResolvable

        The bitfield or array of bitfields to resolve.

      Returns number

      The resolved bitfield as a number.