Hello guys,
I am creating a Telegram bot using Telegraf and it won’t stop even when I just type the command once, for example:
bot.command('tip', pay(1))
bot.hears('hi', (ctx) => ctx.reply('Hey there'))
bot.startPolling()
I have the function pay()
and it is executing even when I haven’t typed in Telegram /tip and also when it keeps saying “Hey there” until I stop myself the bot. It is thought to say just once when I say hi in chat, any suggestion?
thanks in advance…