-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
What component of Red (cog, command, API) would you like to see improvements on?
Mod, Mutes
Describe the enhancement you're suggesting.
After looking through existing commands, the commands that could benefit from this are [p]tempban (and by extension, also [p]modset defaultduration) and the mute commands in Mutes cog. Both of these however are not just a simple find&replace.
Change to [p]tempban itself is simple, however we should also support setting a relativedelta as the default duration in [p]modset defaultduration. I suppose that the easiest acceptable way of doing it would be to have a custom converter that accepts a string, uses parse_relativedelta on it, and returns the original string which we can then save to Config. There would also be a need for a config migration that would convert the existing values (integers) to the new format. An alternative solution for storing would be to use a serialized relativedelta - dictionary with the proper kwargs for relativedelta.
As for mute commands, the above applies but the regex for Mutes's cogs custom MuteTime converter is a bit different to allow time interval both at the beginning and the end of the mute reason. I'm guessing that we will just use relativedelta here directly rather than the converter.
Anything else?
Originally posted by @jack1142 in #5000 (review)