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.
This commit is contained in:
vchikalkin 2025-09-17 12:07:04 +03:00
parent 7b0b2c7074
commit 0fd104048f

View File

@ -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);