Class DiscordUsers

Represents a class for interacting with Discord users.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

client: Client

The client used to make requests.

Methods

  • Retrieves the avatar of a Discord user.

    Parameters

    • Optional username: string = "@me"

      The username of the user. Defaults to the current user.

    Returns Promise<any>

    • A promise that resolves with the avatar image.
  • Retrieves the banner of a Discord user.

    Parameters

    • Optional username: string = "@me"

      The username of the user. Defaults to the current user.

    Returns Promise<any>

    • A promise that resolves with the banner image.
  • Retrieves information about a Discord user.

    Parameters

    • Optional id: string = "@me"

      The ID of the user. Defaults to the current user.

    Returns Promise<any>

    • A promise that resolves with the user information.
  • Makes an HTTP request to the specified endpoint.

    Parameters

    • endpoint: string

      The endpoint to make the request to.

    • Optional data: any

      The data to send with the request (optional).

    Returns Promise<any>

    A Promise that resolves to the response data.

    Throws

    If the request fails.

Generated using TypeDoc