mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
docs: fix typos (#9127)
* docs: fix typos * indicies -> indices * rename file --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -109,7 +109,7 @@ class GuildAuditLogsEntry {
|
||||
this.actionType = GuildAuditLogsEntry.actionType(data.action_type);
|
||||
|
||||
/**
|
||||
* The type of action that occured.
|
||||
* The type of action that occurred.
|
||||
* @type {AuditLogEvent}
|
||||
*/
|
||||
this.action = data.action_type;
|
||||
|
||||
@@ -58,7 +58,7 @@ export function proxyRequests(rest: REST): RequestHandler {
|
||||
} else if (error instanceof Error && error.name === 'AbortError') {
|
||||
populateAbortErrorResponse(res);
|
||||
} else {
|
||||
// Unclear if there's better course of action here for unknown erorrs. Any web framework allows to pass in an error handler for something like this
|
||||
// Unclear if there's better course of action here for unknown errors. Any web framework allows to pass in an error handler for something like this
|
||||
// at which point the user could dictate what to do with the error - otherwise we could just 500
|
||||
throw error;
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@ test('Handle unexpected 429', async () => {
|
||||
const previous = performance.now();
|
||||
let firstResolvedTime: number;
|
||||
let secondResolvedTime: number;
|
||||
const unexepectedSublimit = api.get('/unexpected').then((res) => {
|
||||
const unexpectedSublimit = api.get('/unexpected').then((res) => {
|
||||
firstResolvedTime = performance.now();
|
||||
return res;
|
||||
});
|
||||
@@ -369,7 +369,7 @@ test('Handle unexpected 429', async () => {
|
||||
return res;
|
||||
});
|
||||
|
||||
expect(await unexepectedSublimit).toStrictEqual({ test: true });
|
||||
expect(await unexpectedSublimit).toStrictEqual({ test: true });
|
||||
expect(await queuedSublimit).toStrictEqual({ test: true });
|
||||
expect(performance.now()).toBeGreaterThanOrEqual(previous + 1_000);
|
||||
// @ts-expect-error: This is intentional
|
||||
|
||||
@@ -152,7 +152,7 @@ export async function generateIndex(model: ApiModel, packageName: string, tag =
|
||||
);
|
||||
}
|
||||
|
||||
export async function generateAllIndicies() {
|
||||
export async function generateAllIndices() {
|
||||
for (const pkg of PACKAGES) {
|
||||
const response = await request(`https://docs.discordjs.dev/api/info?package=${pkg}`);
|
||||
const versions = await response.body.json();
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface BootstrapOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility class for bootstraping a worker thread to be used for sharding
|
||||
* Utility class for bootstrapping a worker thread to be used for sharding
|
||||
*/
|
||||
export class WorkerBootstrapper {
|
||||
/**
|
||||
|
||||
@@ -542,7 +542,7 @@ export class WebSocketShard extends AsyncEventEmitter<WebSocketShardEventsMap> {
|
||||
}
|
||||
|
||||
case GatewayCloseCodes.UnknownError: {
|
||||
this.debug([`An unknown error occured: ${code}`]);
|
||||
this.debug([`An unknown error occurred: ${code}`]);
|
||||
return this.destroy({ code, recover: WebSocketShardDestroyRecovery.Resume });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user