Triangle.js Docs
    Preparing search index...

    Function relationship

    • Parameters

      • get: <T = any>(
            __namedParameters: {
                headers?: Record<string, string>;
                json?: boolean;
                token?: string | null;
                uri: string;
            },
        ) => Promise<Res<T>>
      • post: <T = any>(
            __namedParameters: {
                body: Record<string, any>;
                headers?: Record<string, string>;
                json?: boolean;
                token?: string | null;
                uri: string;
            },
        ) => Promise<Res<T>>
      • __: APIDefaults

      Returns {
          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>;
      }

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

        Block a user

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

        Friend a user

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

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

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

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