From 1339bc573d09bdf034d3c8ebff3227d6a7e78573 Mon Sep 17 00:00:00 2001 From: Leandro Di Lorenzo Date: Fri, 12 Jan 2024 13:57:22 -0300 Subject: [PATCH] fix: regex for hi --- src/bot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot.ts b/src/bot.ts index 31a03d7..c9cd2d3 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -22,7 +22,7 @@ bot.help(ctx => ctx.reply('Send me a sticker')); // Basic and Info bot.hears(/^ping$/i, ctx => ctx.reply('ACK')); -bot.hears(/(hi|hola)/, ctx => ctx.reply('👋')); +bot.hears(/\b(hi|hola)\b/, ctx => ctx.reply('👋')); bot.hears(/^espi +version/i, ctx => ctx.reply(`Soy ${ctx.botInfo?.username}@${process.env.npm_package_version}`)); bot.hears(/^espi +id/i, ctx => { const name = ctx.chat.type === 'private' ? `${ctx.chat.first_name} (@${ctx.chat.username})` : ctx.chat.title;