zeroone2numeral2 / bbr-staff-bot Goto Github PK
View Code? Open in Web Editor NEWflytek/bbr's Telegram bot
License: GNU General Public License v3.0
flytek/bbr's Telegram bot
License: GNU General Public License v3.0
[events]
[webcal]
Event model:
related to #21
Manual commands that can be used in reply to any user message to accept/refuse the user
we need to keep track of the message id containing the invite link
also, revoke the invite link if we generated it per-user (see User model properties)
When you start typing something, the bot keyboard is hidden and users might have difficulties to access it again
An alternative solution would be sending a message with a ReplyKeyboardMarkup every time the user sends something, so the keyboard is displayed again
We should create a module where filters that handle messages in specific chats (staff chat, users chat) are initialized and updated when needed. In this way, messages that do not belong to these gtroups will no be handled by their special handlers because they will not pass filters
Allows to add a "reason"/"note" that will be logged to the staff message & log message
Assicurarsi che solo utenti autorizzati possano usare il comando
New fields:
Shortcut methods:
.approved() -> application_status or is_member are true
only if they are not a super admin
Also save whether the user blocked the bot or not (new User model property)
Todos:
switch_inline_query_chosen_chat
(also allow group chats?)/ban
should also ban invitations from that userWill add a line to the staff message & post a message to the log chat
Requires two taps
Quando vengono rimossi da admin, modifica anche il loro scope
if so, what to do with this info?
We should keep a stack of invite links (new InviteLink
db model) that should be used to let people join the users chat: every n hours, the bot revokes the previously generated invite link (selecting all the links in the db and try to revoke those who have revoked == false()
, and generates a new one.
This newly generated invite link might be set to expire directly at api request-level. In this case we don't need to revoke it (maybe try to test what happens when we try to revoke an expired link).
When an user is accepted, send them a message with an inline button that says "tap here to get the invite link". When tapped, the reply markup is edited with the url button containing the most recent link. This "tap to get the link" behavior allows to avoid an user tapping on an expired link, because they saw the message many hours later after we sent it.
We might decide to select an url from the invite links stash just when generating a one-time url fails
We would need to save also every message sent in the admins chat
Mark the user as "did not apply yet", and treat every message from the user as a new user message
Just log or also send to the user?
also warn them when they still have two messages left to send at max
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.