2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-08-30 21:55:17 +00:00

also delete messages from mangled reports

This commit is contained in:
Martin Rys
2021-02-05 12:43:56 +01:00
parent 04a0995e02
commit 0d10c7cbb7

View File

@@ -24,6 +24,7 @@ const reportHandler = async ctx => {
// Ignore monospaced reports
if (ctx.message.entities?.[0]?.type === "code" && ctx.message.entities[0].offset === 0) return null;
if (!ctx.message.reply_to_message) {
await ctx.deleteMessage();
return ctx.replyWithHTML(
' <b>Reply to message you\'d like to report</b>',
).then(scheduleDeletion());