Skip to content

Commit

Permalink
Fix Client, RequestHandler typings
Browse files Browse the repository at this point in the history
  • Loading branch information
abalabahaha committed Apr 3, 2021
1 parent 32b54c8 commit 886cb30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
12 changes: 5 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,14 @@ declare namespace Eris {
opusOnly?: boolean;
/** @deprecated */
ratelimiterOffset?: number;
/** @deprecated */
requestTimeout?: number;
reconnectDelay?: ReconnectDelayFunction;
rest?: ClientRESTOptions;
rest?: RequestHandlerOptions;
restMode?: boolean;
seedVoiceConnections?: boolean;
ws?: unknown;
}
interface ClientRESTOptions {
interface RequestHandlerOptions {
agent?: HTTPSAgent;
baseURL?: string;
disableLatencyCompensation?: boolean;
Expand Down Expand Up @@ -1341,7 +1340,6 @@ declare namespace Eris {
requestHandler: RequestHandler;
shards: ShardManager;
startTime: number;
token?: string;
unavailableGuilds: Collection<UnavailableGuild>;
uptime: number;
user: ExtendedUser;
Expand Down Expand Up @@ -2229,14 +2227,14 @@ declare namespace Eris {
}

export class RequestHandler implements SimpleJSON {
agent: HTTPSAgent;
baseURL: string;
globalBlock: boolean;
latencyRef: LatencyRef;
options: RequestHandlerOptions;
ratelimits: { [route: string]: SequentialBucket };
readyQueue: (() => void)[];
requestTimeout: number;
userAgent: string;
constructor(client: Client, options?: RequestHandlerOptions);
/** @deprecated */
constructor(client: Client, forceQueueing?: boolean);
globalUnblock(): void;
request(method: RequestMethod, url: string, auth?: boolean, body?: { [s: string]: unknown }, file?: MessageFile, _route?: string, short?: boolean): Promise<Record<string, unknown>>;
Expand Down
1 change: 0 additions & 1 deletion lib/rest/RequestHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class RequestHandler {
}, options);

this._client = client;
this.baseURL = Endpoints.BASE_URL;
this.userAgent = `DiscordBot (https://github.com/abalabahaha/eris, ${require("../../package.json").version})`;
this.ratelimits = {};
this.latencyRef = {
Expand Down

0 comments on commit 886cb30

Please sign in to comment.