hcaptcha / telegram-bot Goto Github PK
View Code? Open in Web Editor NEWA bot to reduce spam on Telegram by showing hCaptcha challenges
License: MIT License
A bot to reduce spam on Telegram by showing hCaptcha challenges
License: MIT License
We need to add a command to the telegram bot that would pop up some details about the users in the room. Things to show:
At least say something like "we encountered an error processing this request" to indicate to look at the logs
Current unit tests actually reach out to telegram, and require a valid key. Right now they're using some random bot account, but should instead not require a real key and mock out the tests instead.
Lets automate the deploy process here so we don't need to do manual steps to rollout
beta
branch get automatically pushed to heroku's staging environment for this bot (github action)Hello there
When I want to deploy the bot
I get error two instances are running at same movement please help me with it!
The bot is spammy. We should delete messages after being posted.
Deleting messages feel like a good next move to address the bot dominating the channel.
Based on the official documentation: "A message can only be deleted if it was sent less than 48 hours ago".
Based on the suggested usage, I think this limitation will allow us to remove a good chunk of the messages after verification
Since captchas expire much faster we should be fine.
Need someone take over ownership of the running and maintenance of this bot.
testuser, [04.09.20 22:29]
/test
hCaptchaBot, [04.09.20 22:29]
Sorry, didn't recognize this command:
/test
hCaptchaBot, [04.09.20 22:29]
Available commands:
/hi - check your status or verify yourself
/restrict <supergroup> - restrict newly joined users in <supergroup>. bot should have admin permissions.
testuser, [04.09.20 22:29]
/test@testbot
hCaptchaBot, [04.09.20 22:29]
Sorry, didn't recognize this command:
/test@testbot
hCaptchaBot, [04.09.20 22:29]
Available commands:
/hi - check your status or verify yourself
/restrict <supergroup> - restrict newly joined users in <supergroup>. bot should have admin permissions.
Telegram bots shouldn't react to any command not targeted at them, or an unknown command not targeted to a particular one. This makes using this bot while having another bot on a channel very, very cumbersome.
Few places where we leave open many connections to the db as indicated by:
$ heroku pg:ps --remote staging
pid | state | source | username | running_for | transaction_start | waiting | query
-------+---------------------+--------+----------------+-----------------+-------------------------------+---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
31479 | idle in transaction | | keoguvuxlyqnts | 00:18:13.381006 | 2020-10-29 22:47:14.225349+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:02:16.844205'::timestamp
31478 | idle in transaction | | keoguvuxlyqnts | 00:18:13.585231 | 2020-10-29 22:47:14.021124+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:02:16.677969'::timestamp
19092 | idle in transaction | | keoguvuxlyqnts | 05:22:02.090353 | 2020-10-29 17:43:25.516002+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:01:51.706861'::timestamp
26644 | idle in transaction | | keoguvuxlyqnts | 00:49:48.350257 | 2020-10-29 22:15:39.256098+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:00:42.551756'::timestamp
4304 | idle in transaction | | keoguvuxlyqnts | 03:08:25.218032 | 2020-10-29 19:57:02.388323+00 | t | SELECT messages.id AS messages_id, messages.user_id AS messages_user_id, messages.chat_id AS messages_chat_id, messages.message_id AS messages_message_id, messages.created_date AS messages_created_date +
| | | | | | | FROM messages +
| | | | | | | WHERE messages.created_date <= '2020-10-29T23:00:16.607548'::timestamp
31140 | idle in transaction | | keoguvuxlyqnts | 00:20:27.888331 | 2020-10-29 22:44:59.718024+00 | t | SELECT channels.id AS channels_id, channels.chat_id AS channels_chat_id, channels.restrict AS channels_restrict, channels.name AS channels_name +
| | | | | | | FROM channels +
| | | | | | | WHERE channels.chat_id = '1108918469'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.