Skip to content

Commit 564545e

Browse files
committed
Don't remove the command in /warn
It's already handled by deleteMessage middleware in commands/index.js. Handling it again causes an unhandled rejection.
1 parent fbbae8c commit 564545e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

handlers/commands/warn.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ const warnHandler = async ({ message, chat, reply, me, state }) => {
4848

4949
await warn(userToWarn, reason);
5050
const warnCount = await getWarns(userToWarn);
51-
const promises = [
52-
bot.telegram.deleteMessage(chat.id, message.message_id)
53-
];
51+
const promises = [];
5452

5553
if (message.reply_to_message) {
5654
promises.push(bot.telegram.deleteMessage(

0 commit comments

Comments
 (0)