Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
fix(CommandManager): don't delete a cooldown message twice (#1048)
Browse files Browse the repository at this point in the history
  • Loading branch information
Allvaa authored Oct 24, 2022
1 parent 0f22137 commit 1da8afe
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/utils/structures/CommandManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,10 @@ export class CommandManager extends Collection<string, CommandComponent> {
]
})
.then(msg => {
void msg
.delete()
.then(m =>
setTimeout(
() => m.delete().catch(e => this.client.logger.error("PROMISE_ERR:", e)),
3500
)
);
setTimeout(
() => msg.delete().catch(e => this.client.logger.error("PROMISE_ERR:", e)),
3500
);
})
.catch(e => this.client.logger.error("PROMISE_ERR:", e));
return;
Expand Down

0 comments on commit 1da8afe

Please sign in to comment.