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
515 stars 217 forks source link

[Bug] /cmd_remove_all_msg_kick_on not working #159

Closed vallemar closed 2 years ago

vallemar commented 2 years ago

I am configuring the option in group cmd_remove_all_msg_kick_on and it has no effect. When a user enters and sends something to the group without solving the captcha, the message is not deleted.

Note, I am using the captcha type button.

J-Rios commented 2 years ago

Thanks for reporting, I will check it.

Are you sure that you have give Bot Administration rights to allow the Bot delete messages?

Regards.

J-Rios commented 2 years ago

Issue confirmed, the list of messages to be delete after kick was added only for images captcha mode.

This changes should fix the issue for both button and poll modes: https://github.com/J-Rios/TLG_JoinCaptchaBot/commit/5f51026c768eea68eb08275ac82237e6552afec9

I will update the deployed Bots (@join_captcha_bot and @pro_join_captcha_bot) tomorrow with this fix.

vallemar commented 2 years ago

@J-Rios Nice!!!

J-Rios commented 2 years ago

Ok, Bots updated, please check if the issue is solved...

vallemar commented 2 years ago

now it's working!

On the other hand, when the button mode is configured, the user can send messages and they appear to everyone, shouldn't the bot delete these messages? can i open a new issue and close this