Skip to content

Commit

Permalink
Revert "fix(Message): delete method caused messageDelete event to fir…
Browse files Browse the repository at this point in the history
…e twice (discordjs#3252)"

This reverts commit e367c85.
  • Loading branch information
samsamson33 committed Feb 27, 2020
1 parent 47e1019 commit 6165374
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/structures/Message.js
Expand Up @@ -454,7 +454,11 @@ class Message extends Base {
*/
delete({ timeout = 0, reason } = {}) {
if (timeout <= 0) {
return this.channel.messages.remove(this.id, reason).then(() => this);
return this.channel.messages.remove(this.id, reason).then(() =>
this.client.actions.MessageDelete.handle({
id: this.id,
channel_id: this.channel.id,
}).message);
} else {
return new Promise(resolve => {
this.client.setTimeout(() => {
Expand Down

0 comments on commit 6165374

Please sign in to comment.