Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout Improvements #13

Closed
dashwav opened this issue Dec 29, 2018 · 4 comments
Closed

Timeout Improvements #13

dashwav opened this issue Dec 29, 2018 · 4 comments

Comments

@dashwav
Copy link
Owner

dashwav commented Dec 29, 2018

User Story:
As a moderator of the discord server
I want a timed out user to have no access to any other channels than #timeout
So that I can ensure that I have the user's undivided attention
And for long time timeout users to be fully removed from any aspect of the server

Overview
When a moderator goes to time a user out, they should be able to do so via a command just like a kick or a ban (.timeout @username). This command should do the following things:

  1. Apply the timeout role
  2. Remove the user from all react-assign channels
    3 (optional) Store the channels somewhere to be reassigned later.

There should also be a .untimeout @username command to reverse these three steps.

@dashwav
Copy link
Owner Author

dashwav commented Dec 29, 2018

I created a branch Christmas-miracle (probably should change the name) for the new implementation of this

@dashwav
Copy link
Owner Author

dashwav commented Dec 29, 2018

First implementation idea:
Iterate through all the react-assign messages, grab all the users that reacted to the message and remove the user's perms from the target_channel of the message. When .untimeout is ran, go through the channels again and restore perms to the target_channels that the user reacted to.

Benefits:
No need to store any DB values
No need for user to re-react to any channels to gain access again.
Simple to code and maintain

Issues:
For some reason message. for user in message.reactions (seen here)[https://github.com/dashwav/nano-chan/blob/christmas-miracle/cogs/moderation.py#L122 ]isn't a reliable function. When I run this command with my alt as the user it only finds the user in 1 out of 12 channels the user has reacted in.

If I am just doing something dumb this is still the route I would like to take, but I am doubtful

@dashwav
Copy link
Owner Author

dashwav commented Dec 29, 2018

Second Implementation idea:
Iterate through all the target_channels and view the users individual permissions using permissions_for Found here. If the user has access to the channel, deny the permission.

Benefits:
Might actually work
Much quicker, less logic

Issues:
This would be very frustrating for a single day timeout, because all of the reacts would still be there, meaning the user would have to go through and double react on each channel they want back into.

@dashwav
Copy link
Owner Author

dashwav commented Dec 29, 2018

Last Implementation idea:
Same as the second implementation, except a list of all the channels the user has been removed from is kept and stored in the database, and when .untimeout is called, the list is restored, and the user given access back to the channels they were removed from.

Benefits:
End user functionality same as first implementation
More consistency, less user frustration than second implementation

Issues:
Much more complex than the other two ideas
Have to create and manage db table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant