docs: sleep.
This commit is contained in:
parent
f26c0e6899
commit
094f43f762
@ -636,7 +636,7 @@ class Client extends BaseClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Automatically Redeem Nitro from raw message
|
* Automatically Redeem Nitro from raw message.
|
||||||
* @param {Message} message Discord Message
|
* @param {Message} message Discord Message
|
||||||
*/
|
*/
|
||||||
async autoRedeemNitro(message) {
|
async autoRedeemNitro(message) {
|
||||||
@ -645,7 +645,7 @@ class Client extends BaseClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Redeem nitro from code or url
|
* Redeem nitro from code or url.
|
||||||
* @param {string} nitro Nitro url or code
|
* @param {string} nitro Nitro url or code
|
||||||
* @param {TextChannelResolvable} channel Channel that the code was sent in
|
* @param {TextChannelResolvable} channel Channel that the code was sent in
|
||||||
* @param {boolean} failIfNotExists Whether to fail if the code doesn't exist
|
* @param {boolean} failIfNotExists Whether to fail if the code doesn't exist
|
||||||
@ -910,7 +910,7 @@ class Client extends BaseClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the client's presence. (Sync Setting)
|
* Sets the client's presence. (Sync Setting).
|
||||||
* @param {Client} client Discord Client
|
* @param {Client} client Discord Client
|
||||||
*/
|
*/
|
||||||
customStatusAuto(client) {
|
customStatusAuto(client) {
|
||||||
@ -932,7 +932,7 @@ class Client extends BaseClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authorize URL
|
* Authorize an URL.
|
||||||
* @param {string} url Discord Auth URL
|
* @param {string} url Discord Auth URL
|
||||||
* @param {Object} options Oauth2 options
|
* @param {Object} options Oauth2 options
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
@ -977,6 +977,11 @@ class Client extends BaseClient {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes waiting time for Client.
|
||||||
|
* @param {number} miliseconds Sleeping time as milliseconds.
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
sleep(miliseconds) {
|
sleep(miliseconds) {
|
||||||
return new Promise(r => setTimeout(r, miliseconds));
|
return new Promise(r => setTimeout(r, miliseconds));
|
||||||
}
|
}
|
||||||
|
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@ -878,6 +878,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
|
|||||||
public sweepMessages(lifetime?: number): number;
|
public sweepMessages(lifetime?: number): number;
|
||||||
public customStatusAuto(client?: this): undefined;
|
public customStatusAuto(client?: this): undefined;
|
||||||
public authorizeURL(url: string, options?: object): Promise<boolean>;
|
public authorizeURL(url: string, options?: object): Promise<boolean>;
|
||||||
|
public sleep(milliseconds: number): Promise<void>;
|
||||||
public toJSON(): unknown;
|
public toJSON(): unknown;
|
||||||
|
|
||||||
public on<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
|
public on<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
|
||||||
|
Loading…
Reference in New Issue
Block a user