Class OAuthHelper

A helper to make using authenticated oauth requests without needing a new client instance.

Hierarchy

  • OAuthHelper

Constructors

  • Parameters

    Returns OAuthHelper

Properties

#private: any

Methods

  • Get the current OAuth2 application's information.

    Returns Promise<Application>

  • Get information about the current authorization.

    Returns Promise<AuthorizationInformation>

  • Get the connections of the currently authenticated user.

    Note: Requires the connections scope.

    Returns Promise<Connection[]>

  • Get the guild member information about the currently authenticated user.

    Note: Requires the guilds.members.read scope.

    Parameters

    • guild: string

      the ID of the guild

    Returns Promise<Member>

  • Get the currently authenticated user's guilds. Note these are missing several properties gateway guilds have.

    Returns Promise<OAuthGuild[]>

  • Get the currently authenticated user's information.

    Note: This does not touch the client's cache in any way.

    Returns Promise<ExtendedUser>

  • Revoke the used access token.

    Parameters

    Returns Promise<void>

  • Update the authenticated user's role connection object for an application. This requires the role_connections.write scope.

    Parameters

    Returns Promise<RoleConnection>

  • Construct an oauth authorization url.

    Parameters

    Returns string

Generated using TypeDoc