mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
chore(docs): example for timeout in message.delete() (#4165)
This commit is contained in:
parent
99612ba14d
commit
b385aedf36
1 changed files with 5 additions and 0 deletions
|
|
@ -496,6 +496,11 @@ class Message extends Base {
|
||||||
* message.delete({ timeout: 5000 })
|
* message.delete({ timeout: 5000 })
|
||||||
* .then(msg => console.log(`Deleted message from ${msg.author.username} after 5 seconds`))
|
* .then(msg => console.log(`Deleted message from ${msg.author.username} after 5 seconds`))
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
|
* @example
|
||||||
|
* // Delete a message after a short delay
|
||||||
|
* message.delete({ timeout: 5000 })
|
||||||
|
* .then(msg => console.log(`Deleted message from ${msg.author.username} after a delay`))
|
||||||
|
* .catch(console.error)
|
||||||
*/
|
*/
|
||||||
delete(options = {}) {
|
delete(options = {}) {
|
||||||
if (typeof options !== 'object') throw new TypeError('INVALID_TYPE', 'options', 'object', true);
|
if (typeof options !== 'object') throw new TypeError('INVALID_TYPE', 'options', 'object', true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue