ReVanced / revanced-helper

🤖 NLP backed bots assisting ReVanced
https://revanced.app
GNU General Public License v3.0
20 stars 8 forks source link

feat: Lock channel behind agreement #40

Open oSumAtrIX opened 8 months ago

oSumAtrIX commented 8 months ago

About

Whenever ReVanced has a big change, the chat gets spammed with users asking for support for example. In such times it would be good to lock the channel in a way that first requires the user to agree not to ask for support in there for example before they can type there

It could work like this:

  1. Use the Discord bot command /agree to: "Not ask for support" to: "Read help" with: "I agree or else I get muted"`
  2. The bot creates a new role for example "Agreed" and only allows that role to read/write that channel
  3. The bot clones the channel in which the command was sent, and hides it from the "Agreed" role
  4. The bot sends a predefined embed and adds the agreements as fields to the embed
  5. The bot adds the with string to the embed and listens for it in that channel
  6. If the user typed it correctly, they receive the "Agreed" role, if not, they receive a warning that they need to agree before they can type in that channel

If we want to unlock the channel, the bot can listen to delete channel events. If the new channel is deleted, the bot deletes the "Agreed" role and adjusts the channel role overrides back if necessary

If we want to lock other channels behind an agreement, "/agree add" could be used which just updates the roles of the channel