RBWCM-SDK Documentation - v1.1.0
    Preparing search index...

    Class UserEntity

    Represents a user within the RBWCM ecosystem. Provides helper methods to update user data and fetch statistics directly from the entity instance.

    Index

    Constructors

    Properties

    discordId: string
    id: number
    ign: string
    partyId: string | null
    registeredAt: Date
    updatedAt: Date

    Methods

    • Bans the user with the specified details.

      Parameters

      • dto: BanUserDto

        The details of the ban, including reason, duration, and staffer information.

      Returns Promise<void>

      A promise that resolves when the ban is successfully issued.

      await user.ban({ reason: 'Violation of rules', bannedBy: 'stafferId' });
      
    • Checks if the user currently has an active ban.

      Returns Promise<boolean>

      A promise resolving to true if the user is currently banned, or false otherwise.

      const isBanned = await user.isBanned();
      console.log(isBanned); // true or false