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

    • Checks if the user has the specified permission.

      Parameters

      • node: string

        The permission node to check.

      • OptionalactiveRoles: string[]

        The roles to consider for permission checking.

      Returns Promise<boolean>

      A promise resolving to true if the user has the permission, or false otherwise.

      const canBan = await user.hasPermission('command.admin.ban');
      if (!canBan) return 'Access Denied';
    • 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