vldc-hq / vldc-bot

The official VLDC telegram group bot
https://vldc.org
MIT License
27 stars 15 forks source link

๐Ÿงป๐Ÿงป๐Ÿงป Towel mode rework โ€“ Bot API 5.5 | The towel in the private chat #232

Open egregors opened 2 years ago

egregors commented 2 years ago

Looks like we could make towel-mode even better!

Bot API 5.5

โ€ข Bots can now contact users who sent a join request to a chat where the bot is an admin โ€“ even if the user never interacted with the bot before. โ€ข Added support for protected content in groups and channels. โ€ข Added support for users posting as a channel in public groups and channel comments. โ€ข Added support for mentioning users by their ID in inline keyboards. โ€ข And more, see the full changelog for details: https://core.telegram.org/bots/api#december-7-2021

Warning: As previously announced, user identifiers can now have up to 52 significant bits and require a 64-bit integer or double-precision float type to be stored safely.

getjump commented 2 years ago

Actually, just before rolling out of a towel-mode:2.0 feature I guess we should made several steps:

  1. Implement proper tests for all current bot modes/skills
    • Mock Telegram API and test what calls are actually made by the bot
    • Etc
  2. Implement some kind of State Machine global and per mode/skill, from which every would benefit. So for example, let's say Nyan are having conversation with User=x in PM, and TowelMode can set State depends on a dialog flow.
  3. Just before we are getting merged towel-mode:2.0 we should enable Join Requests in VLDC Chat, so bot will be the one who decide should someone be added to group or not.

About rework of towel-mode, I guess it should like this:

  1. User clicks invite link or join group
  2. Join request were created -> Nyan can write to user in PM
  3. Nyan writes Towel Mode Message to user in PM
  4. User reads carefully that message, and for example replies to that message with his beautifully crafted intro message
  5. Nyan forwards that message to main group and someone should put ๐Ÿ‘ as a reply to that message (or we can use inline buttons, but i like reply more)
  6. Putting ๐Ÿ‘ means intro was good (not bot-alike), and nyan accepts user join request
  7. If no one puts ๐Ÿ‘, sad for user ๐Ÿ˜ข
  8. If someone puts ๐Ÿ‘Ž , social credit goes down and user should write new intro which will be sended after for example 24 hours or after he will write /send to Nyan, so he can edit his intro message well
  9. We can actually implement some kind of bypass of a Towel Mode -- for example, if user gets invited by someone or user is a known member of VLDC Chat

@egregors @C-Pro What do you think guys?

getjump commented 2 years ago

I think we need to make separate Issue for the Test Coverage of Nyan. ๐Ÿ‘