Add optional time strings to playtime commands #4
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.
About the PR
Changed the playtime commands to allow the minutes argument to take a time string instead of just a number of minutes. This can be done like this: 1y1mo1w1d1h1m, but the order and the number you put in does not matter whatsoever. If an invalid time unit is specified, it is counted as 0 minutes. This is a fully optional change; you can still do the number of minutes without issue, but this is here to automate hour-to-minute or any other time unit translation with 0 effort on an admins' part.
Here's the list of all possible units:
Why / Balance
An issue was brought to my attention in the general chat about how annoying it is to do playtime transfer tickets. With this, I hope to make it even slightly easier on the admin team to do so.
Technical details
Most of this was changing a single line inside the commands classes to count up the minutes that were specified. Additionally, I added a new PlaytimeCommandUtilities at the top of the PlaytimeCommands.cs file to make all of this functional.
Media
Breaking changes
Changelog
🆑