From 91965f1b478e3bf541fe30cfe668e604aa1d8d7b Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Fri, 27 Jun 2025 18:51:42 +0200 Subject: [PATCH] feat: require mention --- src/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index e320933..6369906 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,7 +47,9 @@ const askForGrinders = async (quest: QuestResult) => { }); const filter = (msg: Message) => - msg.channel.id === channel.id && !msg.author.bot; + msg.channel.id === channel.id && + !msg.author.bot && + msg.content.startsWith(`<@${client.user!.id}>`); let confirmed = false; let answer: string | null = null; @@ -55,6 +57,7 @@ const askForGrinders = async (quest: QuestResult) => { const collected = await channel.awaitMessages({ filter, max: 1 }); answer = collected.first()?.content || null; if (!answer) continue; + answer = answer.replace(`<@${client.user!.id}>`, ""); const players = answer .split(",") @@ -125,7 +128,7 @@ client.on("messageCreate", async (message) => { if (message.author.bot) return; if (message.content.startsWith(`<@${client.user!.id}>`)) { - await message.reply("Ok"); + await message.reply("tg"); } });