From 0fd104048f1716f2372c15ace8396fab14ba100b Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Wed, 17 Sep 2025 12:07:04 +0300 Subject: [PATCH] feat(bot): enhance conversation handling by removing redundant typing indication - Added a chat action for 'typing' indication at the start of the bot's conversation flow. - Removed the redundant 'typing' action from individual conversation handlers to streamline the code. --- apps/bot/src/bot/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/bot/src/bot/index.ts b/apps/bot/src/bot/index.ts index 087a329..f45859a 100644 --- a/apps/bot/src/bot/index.ts +++ b/apps/bot/src/bot/index.ts @@ -40,13 +40,15 @@ export function createBot({ token }: Parameters_) { bot.use(autoChatAction(bot.api)); + bot.use(chatAction('typing')); + bot.use(grammyConversations()).command('cancel', async (ctx) => { await ctx.conversation.exitAll(); await ctx.reply(ctx.t('msg-cancel')); }); for (const conversation of Object.values(conversations)) { - bot.use(chatAction('typing'), createConversation(conversation)); + bot.use(createConversation(conversation)); } setInfo(bot);