Properties

channel: {
    replay: ((id: string) => Promise<any>);
}
defaults: APIDefaults = ...
get: (<T>(__namedParameters: {
    headers?: Record<string, string>;
    json?: boolean;
    token?: null | string;
    uri: string;
}) => Promise<Res<T>>)
post: (<T>(__namedParameters: {
    body: Record<string, any>;
    headers?: Record<string, string>;
    json?: boolean;
    token?: string;
    uri: string;
}) => Promise<Res<T>>)
rooms: (() => Promise<Utils.APITypes.Rooms.Room[]>)
server: {
    environment: (() => Promise<Environment>);
    spool: (() => Promise<{
        endpoint: string;
        token: string;
    }>);
}
social: {
    block: ((id: string) => Promise<true>);
    dms: ((id: string) => Promise<DM[]>);
    friend: ((id: string) => Promise<true>);
    unblock: ((id: string) => Promise<boolean>);
    unfriend: ((id: string) => Promise<boolean>);
}

Type declaration

  • block: ((id: string) => Promise<true>)

    Block a user

      • (id): Promise<true>
      • Parameters

        • id: string

        Returns Promise<true>

  • dms: ((id: string) => Promise<DM[]>)
      • (id): Promise<DM[]>
      • Parameters

        • id: string

        Returns Promise<DM[]>

  • friend: ((id: string) => Promise<true>)

    Friend a user

      • (id): Promise<true>
      • Parameters

        • id: string

        Returns Promise<true>

  • unblock: ((id: string) => Promise<boolean>)

    Unblock a user. Note: unblocking a user will unfriend them if they are friended.

      • (id): Promise<boolean>
      • Parameters

        • id: string

        Returns Promise<boolean>

  • unfriend: ((id: string) => Promise<boolean>)

    Unfriend a user. Note: unfriending a user will unblock them if they are blocked.

      • (id): Promise<boolean>
      • Parameters

        • id: string

        Returns Promise<boolean>

users: {
    authenticate: ((username: string, password: string) => Promise<{
        id: string;
        token: string;
    }>);
    exists: ((username: string) => Promise<boolean>);
    get: ((options: {
        username: string;
    } | {
        id: string;
    }) => Promise<Utils.APITypes.Users.User>);
    me: (() => Promise<Me>);
    resolve: ((username: string) => Promise<string>);
}

Type declaration

  • authenticate: ((username: string, password: string) => Promise<{
        id: string;
        token: string;
    }>)
      • (username, password): Promise<{
            id: string;
            token: string;
        }>
      • Parameters

        • username: string
        • password: string

        Returns Promise<{
            id: string;
            token: string;
        }>

  • exists: ((username: string) => Promise<boolean>)

    Checks whether a user exists

      • (username): Promise<boolean>
      • Checks whethere a user exists

        Parameters

        • username: string

        Returns Promise<boolean>

  • get: ((options: {
        username: string;
    } | {
        id: string;
    }) => Promise<Utils.APITypes.Users.User>)

    Get a user's profile

  • me: (() => Promise<Me>)
      • (): Promise<Me>
      • Returns Promise<Me>

  • resolve: ((username: string) => Promise<string>)
      • (username): Promise<string>
      • Resolves a username to a user ID

        Parameters

        • username: string

        Returns Promise<string>

Methods

  • Parameters

    Returns void