Coder Social home page Coder Social logo

bbr-staff-bot's People

Contributors

zeroone2numeral2 avatar

Watchers

 avatar  avatar  avatar

bbr-staff-bot's Issues

flytek events to calendar

[events]

  • chat_id

[webcal]

  • api_key
  • legal_subcal_name
  • free_subcal_name
  • other_subcal_name

Event model:

  • chat_id PK
  • message_id PK
  • event_id (int)
  • title
  • start_date
  • end_date
  • region
  • event_type (legal/free/other)
  • canceled
  • message_text
  • message_date
  • message_edit_date
  • media_group_id
  • media_file_id
  • media_file_unique_id
  • created_on
  • updated_on
  • message_json

chat-based handlers: use dynamic filters.Chat()

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

comandi /accetta e /rifiuta

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

Approval mode: User model migrations

New fields:

  • application_status: default to None, True if application was sent and accepted, False if it was rejected
  • application_received_on
  • application_evaluated_on
  • application_evaluated_by
  • is_member: None
  • is_member_chat_id: the chat id we checked to decide whether the user is a chat member or not
  • is_member_updated_on: when we last updated the is_member field (on user join/leave)

Shortcut methods:
.approved() -> application_status or is_member are true

invitation reflinks meta

Todos:

  • command to get the message with an inline button prompting the user to select another users with switch_inline_query_chosen_chat (also allow group chats?)
  • inline mode should be supported. prompt the user to send their invitation link
  • command to ban invitations from an user (if their link is used, warn the user that the invite link they used is not valid)
  • /ban should also ban invitations from that user
  • the log chat message should show a special field with the inviter

idea: stack link d'invito

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

/requestadmission

Mark the user as "did not apply yet", and treat every message from the user as a new user message

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.