Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prevent spam #9

Merged
merged 6 commits into from
Nov 13, 2021
Merged

feat: prevent spam #9

merged 6 commits into from
Nov 13, 2021

Conversation

aldy505
Copy link
Member

@aldy505 aldy505 commented Nov 12, 2021

after sending the captcha, the bot will listen to the incoming message, right?

then it will check whether or not the user id is in the in-memory cache

if they are, check for the following conditions:

  • if they send other things than plain text -> warn them to solve the captcha first, then delete their latest message
  • if they send a plain text but not a number -> tell them that it's only a number
  • if they send a plain text but a number -> goes into the captcha verification logic

also, I added a fix where in which the user leaves the group before finishing the captcha, it will delete all the message that has been sent before.

@elianiva
Copy link
Member

tambahin lagi buat angka tapi pake spasi, kasih tau kalo ga perlu spasi, misalnya 1 2 3 4

@aldy505
Copy link
Member Author

aldy505 commented Nov 13, 2021

tambahin lagi buat angka tapi pake spasi, kasih tau kalo ga perlu spasi, misalnya 1 2 3 4

@elianiva ini.... susah, mending sekalian di omongin kalo bukan number aja kali ya?

@elianiva
Copy link
Member

@elianiva ini.... susah, mending sekalian di omongin kalo bukan number aja kali ya?

susah kenapa? kasih cek buat ini aja dulu sebelum Atoi

@elianiva elianiva merged commit 863063c into master Nov 13, 2021
@elianiva elianiva deleted the feat/spam_prevent branch November 13, 2021 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants