node-telegram-bot-api icon indicating copy to clipboard operation
node-telegram-bot-api copied to clipboard

A way to add captcha before commands?

Open sidelux opened this issue 6 years ago • 4 comments

I started to fight game bots in my bot, there is a way to add a captcha that block all other commands until captcha validation? Or another way to do that.

Thanks a lot!

sidelux avatar Sep 18 '17 14:09 sidelux

Do you think that checking if the user is another bot could be helpful?

Something like:

bot.on('message', (msg) => {
  if (msg.from.is_bot) {
    // decide what to do if the sender is a bot
  }
})

aramisf avatar Sep 19 '17 09:09 aramisf

@aramisf The problem is that there are 'userbot'. They use telegram cli to write bots, but are recognized with is_bot to false.

sidelux avatar Oct 02 '17 07:10 sidelux

@sidelux I wasn't aware of that!

Can you reproduce that easily?

If so, would you mind pointing me some directions? I'd like to help discovering if this situation is avoidable.

aramisf avatar Oct 04 '17 21:10 aramisf

I don’t know how to do that, but the best way i think would be captcha or something similar. Often userbots are used to automatize operation so... i can’t think anything else.

sidelux avatar Oct 04 '17 21:10 sidelux