-
Notifications
You must be signed in to change notification settings - Fork 0
Husky/mute rewrite #736
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
Open
ghost
wants to merge
14
commits into
master
Choose a base branch
from
husky/mute-rewrite
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Husky/mute rewrite #736
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
😄 I'll fill out info later, need a couple small touches
Split up slashCommandExecute and execute to keep normal command (mostly) the same, no reason to have `permanent | temporary` as an arg when we can guess based on value of 2nd argument
- Remove dangerous code from `;test`, will be done in an `;eval` instead. - Fixed up formatting for overwrites & old mutes - initial old mutes have duration -1 since it's unknown so `;punushments` can clarify we aren't certain when or how long (uTime is a terrible field design)
Not doing legacy options extending in this PR.
- If settings.rolePermissions.removePermanentMute is defined, deny if lower role - Slight unmute embed formatting - mute reason default to `No reason provided` instead of empty string
set to moderator name + icon to help clarity (images are always nice)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
A fix for something that does not work as intended
Change
A modification to something that exists
Quality of Life
An improvement of something that exists
0 participants
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ViBot
Changelog
closes #562
closes #563
mutesTable Restructureddurationbeing0removedOnsetdurationequaling-1are mutes that ended before the DB restructure, mostly used to identify in;punishmentswhen we can't know when a mute was set or how long it wasuTimeonly signified when the mute was supposed to end. It never got updated during an unmute to the time of the unmute, so it's only consistent for those who lasted the entire duration. For mutes it's quite often that's not the case and I'm not comfortable giving an 'ended' time that essentially means nothing.Conversion Script
The below has been tested to work correctly copy-pasting into an
;evalIf an issue occurs, old mutes will either still be in tact or under
mutes_backup. If for whatever reason we need to revert:Rewrote
muteandunmutecommandsunmutefunctionmutedrole to anyone who had the role manually removed but has an active mute in the DB. This is to help avoid inconsistencies when they can be muted again and have multiple active mutes.;mutedoesBugs
Examples
Ignore the footers here, I changed it to just be moderator
displayName&displayAvatarURL()for consistency. Just don't feel like retaking all of them for a minor change