mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-09-02 15:15:20 +00:00
also delete messages from mangled reports
This commit is contained in:
@@ -24,6 +24,7 @@ const reportHandler = async ctx => {
|
|||||||
// Ignore monospaced reports
|
// Ignore monospaced reports
|
||||||
if (ctx.message.entities?.[0]?.type === "code" && ctx.message.entities[0].offset === 0) return null;
|
if (ctx.message.entities?.[0]?.type === "code" && ctx.message.entities[0].offset === 0) return null;
|
||||||
if (!ctx.message.reply_to_message) {
|
if (!ctx.message.reply_to_message) {
|
||||||
|
await ctx.deleteMessage();
|
||||||
return ctx.replyWithHTML(
|
return ctx.replyWithHTML(
|
||||||
'ℹ️ <b>Reply to message you\'d like to report</b>',
|
'ℹ️ <b>Reply to message you\'d like to report</b>',
|
||||||
).then(scheduleDeletion());
|
).then(scheduleDeletion());
|
||||||
|
Reference in New Issue
Block a user