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

fix(CommandManager): don't delete a cooldown message twice #1048

Merged
merged 1 commit into from
Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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