Dav-Git / Dav-Cogs

Dav's cogs for Red-DiscordBot
GNU General Public License v3.0
33 stars 28 forks source link

stickymember - Add option 'saveonleave' #119

Open bctrainers opened 3 months ago

bctrainers commented 3 months ago

Is your feature request related to a problem? Please describe. Not related to a problem. Feature expansion: automation.

Describe the solution you'd like Would like to see the stickymember cog have an new option called 'saveonleave'. This would completely remove the manual side of the cog, and would automatically reapply roles when a user leaves than rejoins the server.

Describe alternatives you've considered Haven't found such an alternative cog/addon available that fits this request outside of this particular cog/addon's preexisting stickymember manual option.

I could venture the assumption that this could be somewhat automated with x26-cog's warden/defender cog rules to trigger 'stickymem' on a periodic/'on-user-leave' rule when certain roles in use are met and the user departs - but would not be ideal, as i am unsure if on-user-leave is also able to recall the role(s) that a user had.

Additional context If 'stickymember saveonleave' is set to false, the current behavior of the cog will function, a manual action is required to make a user be stuck with certain roles on departure to rejoin. If 'stickymember saveonleave' is set to true, the following will occur:

  1. Bot retains the servers/guilds user list(?) with the users associated roles.
  2. A user leaves the server.
  3. The bot will recall their UserID and given Role details and keep it in memory/file/db (whatever it may be) for up to X amount of days (that might be another option that could be settable).
  4. Said user later rejoins the server, the bot will reapply their old roles automatically.