Hierarchy

  • ServerXpService

Constructors

Properties

httpRequest: BaseHttpRequest

Methods

  • Award XP to role Award XP to all members with a particular role.

    Throws

    ApiError

    Parameters

    • options: {
          requestBody: {
              amount: number;
          };
          roleId: number;
          serverId: string;
      }
      • requestBody: {
            amount: number;
        }
        • amount: number

          The amount of XP to award

      • roleId: number

        Role ID to award XP to

      • serverId: string

    Returns CancelablePromise<void>

    void

  • Award XP to a member

    Throws

    ApiError

    Parameters

    • options: {
          requestBody: {
              amount: number;
          };
          serverId: string;
          userId: string;
      }
      • requestBody: {
            amount: number;
        }
        • amount: number

          The amount of XP to award

      • serverId: string
      • userId: string

        Member ID to award XP to

    Returns CancelablePromise<{
        total: number;
    }>

    any Success

  • Bulk award XP to members Take note of the max number of userIds that can be submitted on each request. If you require more, please batch your requests

    Throws

    ApiError

    Parameters

    • options: {
          requestBody: {
              amount: number;
              userIds: string[];
          };
          serverId: string;
      }
      • requestBody: {
            amount: number;
            userIds: string[];
        }
        • amount: number

          The amount of XP to award

        • userIds: string[]
      • serverId: string

    Returns CancelablePromise<{
        totalsByUserId: Record<string, number>;
    }>

    any Success

  • Set a member's XP

    Throws

    ApiError

    Parameters

    • options: {
          requestBody: {
              total: number;
          };
          serverId: string;
          userId: string;
      }
      • requestBody: {
            total: number;
        }
        • total: number

          The total XP to set on the user

      • serverId: string
      • userId: string

        Member ID to set XP to

    Returns CancelablePromise<{
        total: number;
    }>

    any Success

  • Bulk set members' XP Take note of the max number of userIds that can be submitted on each request. If you require more, please batch your requests

    Throws

    ApiError

    Parameters

    • options: {
          requestBody: {
              total?: number;
              userIds: string[];
          };
          serverId: string;
      }
      • requestBody: {
            total?: number;
            userIds: string[];
        }
        • Optional total?: number

          The total XP to set on each user

        • userIds: string[]
      • serverId: string

    Returns CancelablePromise<{
        totalsByUserId: Record<string, number>;
    }>

    any Success

Generated using TypeDoc