[Mutes] Duration should take the first value provided #6274
Labels
Category: Cogs - Mutes
This is related to the Mutes cog.
Status: PRs Welcome
No one is currently assigned to this issue, but we'd be grateful if anyone made a PR.
Type: Bug
Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
What Red version are you using?
3.5.5
Cog name
Mutes
Command name
mute
What did you expect to happen?
[p]mute <user_id> 1h spamming 3 copypastas within 2 hours
.The first time mentioned is
1h
, which means the intended mute time is 1 hour.What actually happened?
Our example:
[p]mute <user_id> 1h spamming 3 copypastas within 2 hours
.If you mention a time, even after one has been specified, it will use the last time mentioned. In this case,
2 hours
is used as the duration instead of the intended1h
.Per
mutes
help screen, the following examples are provided:I would argue that the first mention of a time should be used as the base for the command's duration. In a
reason
you might need to explain that a certain amount of bad behavior took place within a time duration.For further explanation, the
mute
help provides this:[p]mute <users...> [time_and_reason]
Being picky,
time
is listed beforereason
. Therefore, the line of thinking is that you provide a time before the reason, even if it does not matter when reviewing listed examples.How can we reproduce this error?
mutes
cog.mute
command as such:[p]mute <user_id> 1h spamming 3 copypastas within 2 hours
2 hours
instead of the1h
specified first.Anything else?
This would not effect the ability to format mutes in the second example, except it would reverse the behavior (second time is now overwritten by first time mentioned).
[p]mute @member1 @member2 spam 5 hours
If no other time is passed before the
5 hours
in the command, this would function just the same. Mostly this bug report is looking to change the behavior to accept the first mention of a time, rather than the last as it would make more sense.The text was updated successfully, but these errors were encountered: