From 84784ed441fde9fa654d948acb621fc8f357b6ec Mon Sep 17 00:00:00 2001 From: hocsinhgioitoan <89916615+hocsinhgioitoan@users.noreply.github.com> Date: Sat, 19 Nov 2022 09:45:12 +0700 Subject: [PATCH 1/2] doc: fix sleep return type --- package.json | 2 +- src/client/Client.js | 2 +- typings/index.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6bffc46..96d5281 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "devDependencies": { "@commitlint/cli": "^16.0.1", "@commitlint/config-angular": "^16.0.0", - "@discordjs/docgen": "^0.11.1", + "@discordjs/docgen": "^0.12.1", "@favware/npm-deprecate": "^1.0.4", "@types/node": "^16.11.12", "conventional-changelog-cli": "^2.2.2", diff --git a/src/client/Client.js b/src/client/Client.js index 5bce02f..8a3a443 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -980,7 +980,7 @@ class Client extends BaseClient { /** * Makes waiting time for Client. * @param {number} miliseconds Sleeping time as milliseconds. - * @returns {Promise} + * @returns {Promise | null} */ sleep(miliseconds) { return typeof miliseconds === 'number' ? new Promise(r => setTimeout(r, miliseconds)) : null; diff --git a/typings/index.d.ts b/typings/index.d.ts index be71fe8..06977f4 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -878,7 +878,7 @@ export class Client extends BaseClient { public sweepMessages(lifetime?: number): number; public customStatusAuto(client?: this): undefined; public authorizeURL(url: string, options?: object): Promise; - public sleep(milliseconds: number): Promise; + public sleep(milliseconds: number): Promise | null; public toJSON(): unknown; public on(event: K, listener: (...args: ClientEvents[K]) => Awaitable): this; From add645ea3a0f4e8904c8e95b9c21ac3d7a9addb1 Mon Sep 17 00:00:00 2001 From: hocsinhgioitoan <89916615+hocsinhgioitoan@users.noreply.github.com> Date: Sat, 19 Nov 2022 09:50:55 +0700 Subject: [PATCH 2/2] fix version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 96d5281..6bffc46 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "devDependencies": { "@commitlint/cli": "^16.0.1", "@commitlint/config-angular": "^16.0.0", - "@discordjs/docgen": "^0.12.1", + "@discordjs/docgen": "^0.11.1", "@favware/npm-deprecate": "^1.0.4", "@types/node": "^16.11.12", "conventional-changelog-cli": "^2.2.2",