Open LucasPlacentino opened 2 months ago
Would be nice to also include a reason
for the role removal (shows up in the audit logs)
See Disnake documentation, https://docs.disnake.dev/en/stable/api/members.html#disnake.Member.remove_roles :
await remove_roles(*roles, reason=None, atomic=True)
Parameter: reason
(Optional[str]) – The reason for removing these roles. Shows up on the audit log.
Plus, could be used to show a reason on /yearlyUpdate
or on an admin command from the administration server (like /user delete [...]
Potential problem
When a user wish to unregister, they use again the
/ulb
command and click the "confirm delete my data..." button, their server's setup verification role is removed. Should we also remove ALL other roles because those can still permit access to non-public channels even without the server's setup verification role?Example:
ULB student
roleULB student
role removedSolution
Loop through all of their roles and removes them all, not only the server's setup verification role.
See https://github.com/bepolytech/ULBDiscordBot/blob/dev/classes/utils.py#L196