From b385aedf36ba1da9b824a544658320ce8745472c Mon Sep 17 00:00:00 2001 From: anandre <38661761+anandre@users.noreply.github.com> Date: Tue, 5 May 2020 15:41:41 -0500 Subject: [PATCH] chore(docs): example for timeout in message.delete() (#4165) --- src/structures/Message.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/structures/Message.js b/src/structures/Message.js index 22c854446..31fad16cb 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -496,6 +496,11 @@ class Message extends Base { * message.delete({ timeout: 5000 }) * .then(msg => console.log(`Deleted message from ${msg.author.username} after 5 seconds`)) * .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 = {}) { if (typeof options !== 'object') throw new TypeError('INVALID_TYPE', 'options', 'object', true);