From 23e34dec7768ac6c329bdf5f40d94832b9424cc9 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Sat, 28 Jun 2025 15:37:29 +0200 Subject: [PATCH] feat: add result command to force asking --- src/index.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index be60728..91b8633 100644 --- a/src/index.ts +++ b/src/index.ts @@ -133,8 +133,14 @@ client.on("ready", async (client) => { client.on("messageCreate", async (message) => { if (message.author.bot) return; - if (message.content.startsWith(`<@${client.user!.id}> ping`)) { - await message.reply("pong"); + if (message.content.startsWith(`<@${client.user!.id}>`)) { + const command = message.content.replace(`<@${client.user!.id}>`, "").trim(); + if (command === "ping") { + await message.reply("pong"); + } else if (command === "result") { + const quest = await getLatestQuest(); + await askForGrinders(quest); + } } });