doc: fix sleep return type
This commit is contained in:
parent
ea89624644
commit
84784ed441
@ -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",
|
||||
|
@ -980,7 +980,7 @@ class Client extends BaseClient {
|
||||
/**
|
||||
* Makes waiting time for Client.
|
||||
* @param {number} miliseconds Sleeping time as milliseconds.
|
||||
* @returns {Promise<void>}
|
||||
* @returns {Promise<void> | null}
|
||||
*/
|
||||
sleep(miliseconds) {
|
||||
return typeof miliseconds === 'number' ? new Promise(r => setTimeout(r, miliseconds)) : null;
|
||||
|
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@ -878,7 +878,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
||||
public sweepMessages(lifetime?: number): number;
|
||||
public customStatusAuto(client?: this): undefined;
|
||||
public authorizeURL(url: string, options?: object): Promise<boolean>;
|
||||
public sleep(milliseconds: number): Promise<void>;
|
||||
public sleep(milliseconds: number): Promise<void> | null;
|
||||
public toJSON(): unknown;
|
||||
|
||||
public on<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
|
||||
|
Loading…
Reference in New Issue
Block a user