J-Rios / TLG_JoinCaptchaBot

Telegram Bot to verify if users joining a group are human. The Bot sends an image captcha for each new user and kicks any of them who can't solve the captcha in a specified time.
GNU General Public License v3.0
532 stars 218 forks source link

[Question] Fail to delete spam in Bot instance deployed? #97

Closed pratamawijaya closed 3 years ago

pratamawijaya commented 3 years ago

I noticed new variance of spam message coming to my group

sample message and bot response bot_tele_fail

and bot fail to delete message bot_tele_fail_2

i want to contribute, but i dont know how to fix it, i have check your source code,

its around here https://github.com/J-Rios/TLG_JoinCaptchaBot/blob/master/sources/join_captcha_bot.py#L324

and i have check https://github.com/J-Rios/TLG_JoinCaptchaBot/blob/master/sources/tlds-alpha-by-domain.txt too,

but still doesnt have idea how to solve it, because python isnt my primary programming language

J-Rios commented 3 years ago

Hi,

That URL message can be detected as Spam from Bot code without any problem...

Your issue seems to be caused due that Bot instance deployed ("Banglago") is too slow to detect the "new user joins the group" event, and any spam message received before the Bot know that it is a new user won't be considered Spam (the Bot didn't know that it is a new user yet due it is to slow!).

So, check your deploy network latency/delays, check firewalls, proxies, deploy the Bot with a Webhook instead polling, etc.

pratamawijaya commented 3 years ago

ok, thanks for the advice @J-Rios i will change my bot instance to webhook