diff --git a/src/structures/Message.js b/src/structures/Message.js index adc4ec834..a7b55560c 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -482,7 +482,9 @@ class Message extends Base { * .then(msg => console.log(`Deleted message from ${msg.author.username}`)) * .catch(console.error); */ - delete({ timeout = 0, reason } = {}) { + delete(options = {}) { + if (typeof options !== 'object') throw new TypeError('INVALID_TYPE', 'options', 'object', true); + const { timeout = 0, reason } = options; if (timeout <= 0) { return this.channel.messages.delete(this.id, reason).then(() => this); } else {