Move mutes to new cog, add role-based and temporary mutes #3634

Merged
TrustyJAID merged 105 commits from mutes-rewrite into V3/develop 2020-10-26 02:52:11 +01:00
TrustyJAID commented 2020-03-02 03:09:39 +01:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

This moves mutes outside of the mod cog into its own separate cog.

  • Allow mutes to be role based
  • [p]mute defaults to serverwide muting and [p]mutechannel mutes in the current channel
  • Mutes all have an optional time in the reason field to automatically remove the mute
  • Mutes allow for more than 1 user to be muted at a time utilizing commands.Greedy
### Type - [ ] Bugfix - [x] Enhancement - [x] New feature ### Description of the changes This moves mutes outside of the mod cog into its own separate cog. - Allow mutes to be role based - `[p]mute` defaults to serverwide muting and `[p]mutechannel` mutes in the current channel - Mutes all have an optional time in the reason field to automatically remove the mute - Mutes allow for more than 1 user to be muted at a time utilizing commands.Greedy
palmtree5 (Migrated from github.com) reviewed 2020-03-02 03:09:39 +01:00
Twentysix26 (Migrated from github.com) reviewed 2020-03-02 03:09:39 +01:00
kennnyshiwa commented 2020-05-03 22:22:26 +02:00 (Migrated from github.com)

Couple small things i found when testing

  1. Muting someone when you don't have a mute role defined and are just using channel overrides works, however it doesn't actually send the mod-log entry and instead appears to error (side note on this: found that without the modlog enabled it won't say someone has been muted and instead just says they can't talk in any channels which looking back it, does imply it worked, but might be nice to say user has been muted, as it says it when the modlog is enabled, but not when its not)

https://media.kstj.us/DarkorangeImaginativeDunlin.png

though i can confirm it adds the person to each channel and revokes perms properly,

  1. After muting them and getting that error going to unmute them results in this
Exception in command 'unmute'
Traceback (most recent call last):
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "c:\users\kenneth\redenv\lib\site-packages\redbot\cogs\mutes\mutes.py", line 506, in unmute
    await self.config.guild(ctx.guild).muted_users.set(self._server_mutes[ctx.guild.id])
KeyError: 706554165194653718

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 706554165194653718

though it does remove the overrides properly it just throws an ugly error, i also get a similar traceback when trying it with role mutes too, though the key error changes their ID versus the guild id as it was before

  1. Seems that tempmutes with channel overrides doesn't actually ever unmuted, tested with [p]mute @user 5m and [p]mute @user 1 minutes and both mute but never seem to unmute, no apparent errors in console either just no unmute

  2. [p]channelunmute has the same issue as unmute does

Exception` in command 'channelunmute'
Traceback (most recent call last):
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "c:\users\kenneth\redenv\lib\site-packages\redbot\cogs\mutes\mutes.py", line 555, in unmute_channel
    await self.config.channel(channel).muted_users.set(self._channel_mutes[channel.id])
KeyError: 706554165194653721

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 706554165194653721

traceback just for consistency

  1. sense we have mutechannel, i feel unmutechannel works better than channelunmute, but thats just my preference

  2. voicemute and voiceunmute throw the following traceback when trying to mute or unmute someone in voice

Exception in command 'voicemute'
Traceback (most recent call last):
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped
    ret = await coro(*args, **kwargs)
  File "c:\users\kenneth\redenv\lib\site-packages\redbot\cogs\mutes\voicemutes.py", line 167, in voice_mute
    success, issue = await self.mute_user(guild, channel, author, user, audit_reason)
TypeError: mute_user() takes 5 positional arguments but 6 were given

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: mute_user() takes 5 positional arguments but 6 were given

If any of this doesn't make sense let me know and i can explain further

Couple small things i found when testing 1. Muting someone when you don't have a mute role defined and are just using channel overrides works, however it doesn't actually send the mod-log entry and instead appears to error (side note on this: found that without the modlog enabled it won't say someone has been muted and instead just says they can't talk in any channels which looking back it, does imply it worked, but might be nice to say user has been muted, as it says it when the modlog is enabled, but not when its not) https://media.kstj.us/DarkorangeImaginativeDunlin.png though i can confirm it adds the person to each channel and revokes perms properly, 2. After muting them and getting that error going to unmute them results in this ``` Exception in command 'unmute' Traceback (most recent call last): File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped ret = await coro(*args, **kwargs) File "c:\users\kenneth\redenv\lib\site-packages\redbot\cogs\mutes\mutes.py", line 506, in unmute await self.config.guild(ctx.guild).muted_users.set(self._server_mutes[ctx.guild.id]) KeyError: 706554165194653718 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke await ctx.command.invoke(ctx) File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke await injected(*ctx.args, **ctx.kwargs) File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 706554165194653718 ``` though it does remove the overrides properly it just throws an ugly error, i also get a similar traceback when trying it with role mutes too, though the key error changes their ID versus the guild id as it was before 3. Seems that tempmutes with channel overrides doesn't actually ever unmuted, tested with ``[p]mute @user 5m`` and ``[p]mute @user 1 minutes`` and both mute but never seem to unmute, no apparent errors in console either just no unmute 4. ``[p]channelunmute`` has the same issue as unmute does ``` Exception` in command 'channelunmute' Traceback (most recent call last): File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped ret = await coro(*args, **kwargs) File "c:\users\kenneth\redenv\lib\site-packages\redbot\cogs\mutes\mutes.py", line 555, in unmute_channel await self.config.channel(channel).muted_users.set(self._channel_mutes[channel.id]) KeyError: 706554165194653721 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke await ctx.command.invoke(ctx) File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke await injected(*ctx.args, **ctx.kwargs) File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 706554165194653721 ``` traceback just for consistency 5. sense we have mutechannel, i feel unmutechannel works better than channelunmute, but thats just my preference 6. voicemute and voiceunmute throw the following traceback when trying to mute or unmute someone in voice ``` Exception in command 'voicemute' Traceback (most recent call last): File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped ret = await coro(*args, **kwargs) File "c:\users\kenneth\redenv\lib\site-packages\redbot\cogs\mutes\voicemutes.py", line 167, in voice_mute success, issue = await self.mute_user(guild, channel, author, user, audit_reason) TypeError: mute_user() takes 5 positional arguments but 6 were given The above exception was the direct cause of the following exception: Traceback (most recent call last): File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\bot.py", line 892, in invoke await ctx.command.invoke(ctx) File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 797, in invoke await injected(*ctx.args, **ctx.kwargs) File "c:\users\kenneth\redenv\lib\site-packages\discord\ext\commands\core.py", line 92, in wrapped raise CommandInvokeError(exc) from exc discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: mute_user() takes 5 positional arguments but 6 were given ``` If any of this doesn't make sense let me know and i can explain further
mikeshardmind (Migrated from github.com) requested changes 2020-05-24 22:53:11 +02:00
mikeshardmind (Migrated from github.com) left a comment

I'm not sure what the reasoning behind abandoning the work done on V3/feature/mutes, but there are issues with this code here which were actually considered in that branch even in an unfinished state

I'm not sure what the reasoning behind abandoning the work done on `V3/feature/mutes`, but there are issues with this code here which were actually considered in that branch even in an unfinished state
@ -0,0 +1,1567 @@
import asyncio
mikeshardmind (Migrated from github.com) commented 2020-05-24 22:44:59 +02:00

This isn't a safe way to determine if someone was muted, data about mutes should be stored upon muting, it also only works if they were role muted instead of overwrites being applied.

This isn't a safe way to determine if someone was muted, data about mutes should be stored upon muting, it also only works if they were role muted instead of overwrites being applied.
@ -0,0 +564,4 @@
if await self.bot.cog_disabled_in_guild(self, guild):
return
mute_role = await self.config.guild(guild).mute_role()
if not mute_role:
mikeshardmind (Migrated from github.com) commented 2020-05-24 22:47:30 +02:00

This also prevents re-applying channel permission based mutes.

This also prevents re-applying channel permission based mutes.
@ -0,0 +1423,4 @@
}
old_overs = {k: getattr(overwrites, k) for k in new_overs}
overwrites.update(**new_overs)
mikeshardmind (Migrated from github.com) commented 2020-05-24 22:49:18 +02:00

Storing the old overwrites is an error that could change other permissions upon unmute, this should only store the difference in permissions caused by the mute.

Storing the old overwrites is an error that could change other permissions upon unmute, this should only store the difference in permissions caused by the mute.
TrustyJAID (Migrated from github.com) reviewed 2020-05-24 23:14:01 +02:00
@ -0,0 +1,1567 @@
import asyncio
TrustyJAID (Migrated from github.com) commented 2020-05-24 23:14:01 +02:00

This was intentional when I started on this as I did not want to support permission based muting be applied when a user left and rejoined encouraging people use the role based model instead if they wanted to prevent people leaving and rejoining to avoid a mute.

This was intentional when I started on this as I did not want to support permission based muting be applied when a user left and rejoined encouraging people use the role based model instead if they wanted to prevent people leaving and rejoining to avoid a mute.
TrustyJAID (Migrated from github.com) reviewed 2020-05-24 23:21:22 +02:00
@ -0,0 +1423,4 @@
}
old_overs = {k: getattr(overwrites, k) for k in new_overs}
overwrites.update(**new_overs)
TrustyJAID (Migrated from github.com) commented 2020-05-24 23:21:22 +02:00

This only stores the old overwrites for specific permissions on that user. overwrites above is the channel perms for that user only and the state they were in before they were muted. This was straight from the old mutes in mod.

This only stores the old overwrites for specific permissions on that user. `overwrites` above is the channel perms for that user only and the state they were in before they were muted. This was straight from the old mutes in mod.
DevilXD commented 2020-07-05 15:13:35 +02:00 (Migrated from github.com)

It would be great if this would expose some kind of an API that'd allow 3rd party cogs to apply timed / permanent mutes as well. I have a cog that currently has to do this manually, via creating it's own Muted role and tracking the unmute time on each muted member. It'd be much easier if I could just hook-up to this via an API.

It would be great if this would expose some kind of an API that'd allow 3rd party cogs to apply timed / permanent mutes as well. I have a cog that currently has to do this manually, via creating it's own `Muted` role and tracking the unmute time on each muted member. It'd be much easier if I could just hook-up to this via an API.
TrustyJAID commented 2020-07-08 23:42:29 +02:00 (Migrated from github.com)

@DevilXD that was outside the scope of this PR. I wanted to get the new features in people's hands and get them stable before things are re-arranged as an API which also moves a lot of this outside of a cog and into something core always has available.

@DevilXD that was outside the scope of this PR. I wanted to get the new features in people's hands and get them stable before things are re-arranged as an API which also moves a lot of this outside of a cog and into something core always has available.
Dav-Git (Migrated from github.com) reviewed 2020-08-21 12:12:49 +02:00
Dav-Git (Migrated from github.com) left a comment

This is just a code review, I still have to test any of this.

I marked any instances of datetime usage (I'm sure I missed some) so that someone who better understood #4017 can more easily take a look at them.

Most part of this looks fine to me

This is just a code review, I still have to test any of this. I marked any instances of datetime usage (I'm sure I missed some) so that someone who better understood #4017 can more easily take a look at them. Most part of this looks fine to me
@ -0,0 +1,8 @@
from redbot.core.bot import Red
Dav-Git (Migrated from github.com) commented 2020-08-21 11:31:39 +02:00

Is this import and typehint necessary?

Is this import and typehint necessary?
@ -0,0 +1,1567 @@
import asyncio
Dav-Git (Migrated from github.com) commented 2020-08-21 11:44:01 +02:00

?

?
Dav-Git (Migrated from github.com) commented 2020-08-21 11:46:32 +02:00

Might want to use tasks.loop here? There won't be a big difference though.

Otherwise this could be handled like tempbans to be more efficient and percise, current handling should be good enough to start with though.

Might want to use tasks.loop here? There won't be a big difference though. Otherwise this could be handled like tempbans to be more efficient and percise, current handling should be good enough to start with though.
Dav-Git (Migrated from github.com) commented 2020-08-21 11:49:22 +02:00

Something something time zone aware datetime objects. I'm not an expert here. Maybe @jack1142 can clarify

Something something time zone aware datetime objects. I'm not an expert here. Maybe @jack1142 can clarify
Dav-Git (Migrated from github.com) commented 2020-08-21 11:50:39 +02:00

@jack1142 is this still correct with what we learned about naive/aware datetime objects?

@jack1142 is this still correct with what we learned about naive/aware datetime objects?
Dav-Git (Migrated from github.com) commented 2020-08-21 11:51:42 +02:00

Same thing with datetime

Same thing with datetime
Dav-Git (Migrated from github.com) commented 2020-08-21 11:53:32 +02:00

Datetime

Datetime
Dav-Git (Migrated from github.com) commented 2020-08-21 11:53:51 +02:00

Datetime

Datetime
Dav-Git (Migrated from github.com) commented 2020-08-21 11:57:22 +02:00

This shouldn't fail silently

This shouldn't fail silently
Dav-Git (Migrated from github.com) commented 2020-08-21 12:01:35 +02:00

Yay more datetimes

Yay more datetimes
Dav-Git (Migrated from github.com) commented 2020-08-21 12:03:27 +02:00

Does this overwrite "indefinite" mutes?
I'm not a fan of the default time here. How can an indefinite mute still happen with a default time set? If you want to keep this behaviour it definitely needs to be explained in the docstrings for [p]mute

Does this overwrite "indefinite" mutes? I'm not a fan of the default time here. How can an indefinite mute still happen with a default time set? If you want to keep this behaviour it definitely needs to be explained in the docstrings for ``[p]mute``
Dav-Git (Migrated from github.com) commented 2020-08-21 12:06:35 +02:00

Datetime

Datetime
Dav-Git (Migrated from github.com) commented 2020-08-21 12:08:07 +02:00

Switch the alias and name around here or in mutechannel for consistency

Switch the alias and name around here or in mutechannel for consistency
@ -0,0 +19,4 @@
T_ = i18n.Translator("Mutes", __file__)
_ = lambda s: s
Dav-Git (Migrated from github.com) commented 2020-08-21 11:35:39 +02:00

What purpose does this serve?

What purpose does this serve?
@ -0,0 +22,4 @@
_ = lambda s: s
MUTE_UNMUTE_ISSUES = {
"already_muted": _("That user is already muted in this channel."),
Dav-Git (Migrated from github.com) commented 2020-08-21 11:37:20 +02:00

redgettext will output these as strings to be translated even though _ isn't a translator here

redgettext will output these as strings to be translated even though _ isn't a translator here
@ -0,0 +66,4 @@
def __init__(self, bot: Red):
self.bot = bot
self.config = Config.get_conf(self, 49615220001, force_registration=True)
Dav-Git (Migrated from github.com) commented 2020-08-21 11:41:14 +02:00

Shouldn't we use this here?

Shouldn't we use [this](https://docs.discord.red/en/stable/framework_config.html#redbot.core.config.Config.get_core_conf) here?
@ -0,0 +688,4 @@
role = await ctx.guild.create_role(
name=name, permissions=perms, reason=_("Mute role setup")
)
except discord.errors.Forbidden:
Dav-Git (Migrated from github.com) commented 2020-08-21 12:00:10 +02:00

This shouldn't fail silently

This shouldn't fail silently
@ -0,0 +1,235 @@
from typing import Optional, Tuple
Dav-Git (Migrated from github.com) commented 2020-08-21 12:09:50 +02:00

This is obsolete?

This is obsolete?
TrustyJAID (Migrated from github.com) reviewed 2020-08-21 12:28:36 +02:00
@ -0,0 +66,4 @@
def __init__(self, bot: Red):
self.bot = bot
self.config = Config.get_conf(self, 49615220001, force_registration=True)
TrustyJAID (Migrated from github.com) commented 2020-08-21 12:28:36 +02:00

In this case no, get_core_conf is for anything inside the core package not cogs distributed with core unless I'm mistaken.

In this case no, `get_core_conf` is for anything inside the core package not cogs distributed with core unless I'm mistaken.
TrustyJAID (Migrated from github.com) reviewed 2020-08-21 22:52:49 +02:00
@ -0,0 +1,8 @@
from redbot.core.bot import Red
TrustyJAID (Migrated from github.com) commented 2020-08-21 22:52:48 +02:00

It's not necessary but in the essence if typehints it ensures that this cog is meant for Red and not someone elses bot that supports cogs.

It's not necessary but in the essence if typehints it ensures that this cog is meant for Red and not someone elses bot that supports cogs.
TrustyJAID (Migrated from github.com) reviewed 2020-08-21 22:54:27 +02:00
@ -0,0 +19,4 @@
T_ = i18n.Translator("Mutes", __file__)
_ = lambda s: s
TrustyJAID (Migrated from github.com) commented 2020-08-21 22:54:27 +02:00

After some digging this and the immediate comment after this was proposed so that redgettext will still grabt the correct strings but it doesn't actually get translated until runtime.

After some digging this and the immediate comment after this was proposed so that redgettext will still grabt the correct strings but it doesn't actually get translated until runtime.
TrustyJAID (Migrated from github.com) reviewed 2020-08-21 23:14:49 +02:00
@ -0,0 +1,1567 @@
import asyncio
TrustyJAID (Migrated from github.com) commented 2020-08-21 23:14:49 +02:00

These datetimes don't need to worry about being aware or naive since they represent a timedelta from a naive datetime object in seconds. I believe if this were to cause an issue it might happen if the system time changes but I am not sure entirely. This was the simpler logic to deal with change in time rather than fully implementing timedelta calculations as it sets a single point in time as a timestamp where the mute will be active until. The referenced issue you linked was for converting from datetime to timestamp and back to datetime.

These datetimes don't need to worry about being aware or naive since they represent a timedelta from a naive datetime object in seconds. I believe if this were to cause an issue it might happen if the system time changes but I am not sure entirely. This was the simpler logic to deal with change in time rather than fully implementing timedelta calculations as it sets a single point in time as a timestamp where the mute will be active until. The referenced issue you linked was for converting from datetime to timestamp and back to datetime.
TrustyJAID (Migrated from github.com) reviewed 2020-08-21 23:17:28 +02:00
@ -0,0 +1,1567 @@
import asyncio
TrustyJAID (Migrated from github.com) commented 2020-08-21 23:17:28 +02:00

This is handled under the new converter for finding time inside the reason_and_time arg. If no time is detected then this check will return false meaning until will be None allowing for indefinite mutes.

This is handled under the new converter for finding time inside the reason_and_time arg. If no time is detected then this check will return false meaning `until` will be None allowing for indefinite mutes.
Jackenmen (Migrated from github.com) reviewed 2020-08-22 02:01:12 +02:00
@ -0,0 +1,1567 @@
import asyncio
Jackenmen (Migrated from github.com) commented 2020-08-22 02:01:12 +02:00

Timedeltas don't matter as long as you subtract naive datetime objects with same timezone (or just use aware datetime objects) since they are relative, but there are places where the .timestamp() is used on naive objects created by datetime.utcnow() which will indeed cause it to save incorrect timestamp. You should instead use datetime.now() (optionally with tz=timezone.utc kwarg) for this to work correctly (same goes for creating case with modlog).

Naive datetime objects are evil.

Timedeltas don't matter as long as you subtract naive datetime objects with same timezone (or just use aware datetime objects) since they are relative, but there are places where the `.timestamp()` is used on naive objects created by `datetime.utcnow()` which will indeed cause it to save incorrect timestamp. You should instead use `datetime.now()` (optionally with `tz=timezone.utc` kwarg) for this to work correctly (same goes for creating case with modlog). **Naive datetime objects are evil.**
Dav-Git (Migrated from github.com) reviewed 2020-08-22 07:40:28 +02:00
@ -0,0 +1,1567 @@
import asyncio
Dav-Git (Migrated from github.com) commented 2020-08-22 07:40:28 +02:00

Yes, but if no until is provided it will use the default time set in config. Or am I reading this wrong?

Yes, but if no ``until`` is provided it will use the default time set in config. Or am I reading this wrong?
TrustyJAID (Migrated from github.com) reviewed 2020-08-22 07:51:43 +02:00
@ -0,0 +1,1567 @@
import asyncio
TrustyJAID (Migrated from github.com) commented 2020-08-22 07:51:42 +02:00

if duration is supplied which comes from the converter it will use that and override the default. If a guild opts for a default for all mutes they cannot override the default time to be indefinite. Maybe not support a default time for mutes? I can't think of a simple way to allow this to explicitly not have a duration if the server has chosen to set a default. Then again the default is optional entirely so I could just document that better.

if duration is supplied which comes from the converter it will use that and override the default. If a guild opts for a default for all mutes they cannot override the default time to be indefinite. Maybe not support a default time for mutes? I can't think of a simple way to allow this to explicitly not have a duration if the server has chosen to set a default. Then again the default is optional entirely so I could just document that better.
Dav-Git (Migrated from github.com) reviewed 2020-08-22 08:36:26 +02:00
@ -0,0 +1,1567 @@
import asyncio
Dav-Git (Migrated from github.com) commented 2020-08-22 08:36:26 +02:00

If you think the default time is beneficial (I don't really) you should definitely make it clear that that rules out the indefinite mute. That was the point of my first comment but it wasn't worded clearly enough

If you think the default time is beneficial (I don't really) you should definitely make it clear that that rules out the indefinite mute. That was the point of my first comment but it wasn't worded clearly enough
Dav-Git commented 2020-09-01 11:07:54 +02:00 (Migrated from github.com)

So, I did some testing.

  • Indefinite mutes don't show up in [p]activemutes
    grafik
  • a 2h mute apparently takes 4h according to modlog duration
    grafik
  • 2h mute only really takes 1h though if I can believe until (I am UTC+1)

Mute expired correctly after 2h

So, I did some testing. - Indefinite mutes don't show up in ``[p]activemutes`` ![grafik](https://user-images.githubusercontent.com/57032623/91830117-dc316a00-ec31-11ea-9384-ac5ba13e6bf9.png) - a 2h mute apparently takes 4h according to modlog duration ![grafik](https://user-images.githubusercontent.com/57032623/91830256-1569da00-ec32-11ea-83e5-b8b3a004423a.png) - 2h mute only really takes 1h though if I can believe ``until`` (I am UTC+1) Mute expired correctly after 2h
Dav-Git (Migrated from github.com) reviewed 2020-09-02 10:30:48 +02:00
Dav-Git (Migrated from github.com) left a comment
No description provided.
After testing I can say that this works reliably now.
flaree commented 2020-09-09 01:21:29 +02:00 (Migrated from github.com)

After messing around with mute I have 2 possible requests to try make it easier to use.

  • A typing indicator on mute/unmute (especially if using permissions) as it appears the bot is just hanging doing nothing.
  • muteset makerole should also set that role as the muted role
After messing around with mute I have 2 possible requests to try make it easier to use. - A typing indicator on mute/unmute (especially if using permissions) as it appears the bot is just hanging doing nothing. - ~~muteset makerole should also set that role as the muted role~~
Dav-Git commented 2020-09-15 07:45:26 +02:00 (Migrated from github.com)

I've been testing this for a while and am really happy with it. Timestamps are still off by some hours but functionally this works like a charm. Persistence across member rejoins would be nice but is not necessarily within scope here.

I found no other bugs over the past 7 days in prod and would take this over the old mutes any day for the cleaner UI and higher reliability for tempmutes than the scheduler workaround.

I've been testing this for a while and am really happy with it. Timestamps are still off by some hours but functionally this works like a charm. Persistence across member rejoins would be nice but is not necessarily within scope here. I found no other bugs over the past 7 days in prod and would take this over the old mutes any day for the cleaner UI and higher reliability for tempmutes than the scheduler workaround.
Dav-Git (Migrated from github.com) reviewed 2020-09-22 00:48:24 +02:00
Dav-Git (Migrated from github.com) left a comment
No description provided.
Not a CODE review. I've used this over the past bit in production now and haven't encountered any oddities or errors. The UI is pretty intuitive (so much better than old mutes) and works reliably.
Dav-Git commented 2020-09-26 20:27:17 +02:00 (Migrated from github.com)

Screenshot_20200926-202550.jpg

Timestamp on the manual modlog cases still off by 2h. Everything else a-ok. Not sure if it's a mute problem or modlog.

![Screenshot_20200926-202550.jpg](https://user-images.githubusercontent.com/57032623/94347687-cabb6200-0025-11eb-841d-46255c6cbbdf.jpg) Timestamp on the manual modlog cases still off by 2h. Everything else a-ok. Not sure if it's a mute problem or modlog.
Dav-Git commented 2020-10-18 12:00:45 +02:00 (Migrated from github.com)

Screenshot_20201018-115822.jpg

Not quite sure what caused this

![Screenshot_20201018-115822.jpg](https://user-images.githubusercontent.com/57032623/96364131-a89a9880-1128-11eb-9a2e-14f0fed953d1.jpg) Not quite sure what caused this
Drapersniper commented 2020-10-18 12:15:53 +02:00 (Migrated from github.com)

Screenshot_20201018-115822.jpg

Not quite sure what caused this

Your cache no longer having those users? i.e they left the server?

> ![Screenshot_20201018-115822.jpg](https://user-images.githubusercontent.com/57032623/96364131-a89a9880-1128-11eb-9a2e-14f0fed953d1.jpg) > > Not quite sure what caused this Your cache no longer having those users? i.e they left the server?
Dav-Git commented 2020-10-18 12:16:34 +02:00 (Migrated from github.com)

They are still in the server. Some of them even on tempmutes that didn't get cleared I just learned a minute ago

They are still in the server. Some of them even on tempmutes that didn't get cleared I just learned a minute ago
Drapersniper commented 2020-10-18 12:18:04 +02:00 (Migrated from github.com)

They are still in the server. Some of them even on tempmutes that didn't get cleared I just learned a minute ago

@invalid-user is often caused due to your client being unable to render a mention

> They are still in the server. Some of them even on tempmutes that didn't get cleared I just learned a minute ago @invalid-user is often caused due to your client being unable to render a mention
Dav-Git commented 2020-10-18 12:22:18 +02:00 (Migrated from github.com)

I'll take a lookie on the PC later. Maybe android being derpy again. None the less, these 3 are missing timing information if I haven't gone completely insane.

I'll take a lookie on the PC later. Maybe android being derpy again. None the less, these 3 are missing timing information if I haven't gone completely insane.
Dav-Git commented 2020-10-18 13:11:20 +02:00 (Migrated from github.com)

So after a quick investigation it seems that the guild wasn't cached properly. Not sure why the timed mutes keep failing (people are still muted) though

So after a quick investigation it seems that the guild wasn't cached properly. Not sure why the timed mutes keep failing (people are still muted) though
Jackenmen (Migrated from github.com) requested changes 2020-10-19 02:12:11 +02:00
Jackenmen (Migrated from github.com) left a comment

I'll be doing some additional testing tomorrow, but the review comments should contain pretty much everything that I had any concerns about.

List of few review comments that didn't fit into code:

  1. Catching RuntimeError for modlog.create_case() doesn't do anything and any such try-except has been removed in #4095. This PR introduces a few of the old try-excepts like this.
  2. [p](un)mute voice has been changed a bit so that it takes action instantly, see: #4064
  3. You should add yourself to CODEOWNERS file for redbot/core/mutes since you'll be the most knowledgeable person when it comes to Mutes cog.

I know the comment count seems to be high, but there's plenty of things that I just repeated multiple times so that you don't miss some occurrence of the issue.

I'll be doing some additional testing tomorrow, but the review comments should contain pretty much everything that I had any concerns about. List of few review comments that didn't fit into code: 1. Catching `RuntimeError` for `modlog.create_case()` doesn't do anything and any such `try-except` has been removed in #4095. This PR introduces a few of the old `try-except`s like this. 2. `[p](un)mute voice` has been changed a bit so that it takes action instantly, see: #4064 3. You should add yourself to CODEOWNERS file for `redbot/core/mutes` since you'll be the most knowledgeable person when it comes to Mutes cog. I know the comment count seems to be high, but there's plenty of things that I just repeated multiple times so that you don't miss some occurrence of the issue.
Jackenmen (Migrated from github.com) commented 2020-10-10 00:29:44 +02:00

This method (as in, the actual method, not the abstract one that I'm commenting on) was also used by [p]voicekick command in kickban.py file.

This method (as in, the actual method, not the abstract one that I'm commenting on) was also used by `[p]voicekick` command in `kickban.py` file.
@ -0,0 +8,4 @@
log = logging.getLogger("red.cogs.mutes")
# the following regex is slightly modified from Red
Jackenmen (Migrated from github.com) commented 2020-10-10 00:38:13 +02:00

Would be nice if this explained how is it different from the linked regex to be more helpful for the code reader.

Would be nice if this explained how is it different from the linked regex to be more helpful for the code reader.
@ -0,0 +1,1567 @@
import asyncio
Jackenmen (Migrated from github.com) commented 2020-10-10 00:55:28 +02:00

This cog help docstring could probably be improved a bit.

This cog help docstring could probably be improved a bit.
Jackenmen (Migrated from github.com) commented 2020-10-10 01:35:36 +02:00
        self._unmute_tasks: Dict[str, asyncio.Task] = {}
```suggestion self._unmute_tasks: Dict[str, asyncio.Task] = {} ```
Jackenmen (Migrated from github.com) commented 2020-10-10 01:36:28 +02:00

This comment seems no longer relevant (at least the second part of it) and it seems to also be misplaced.

This comment seems no longer relevant (at least the second part of it) and it seems to also be misplaced.
Jackenmen (Migrated from github.com) commented 2020-10-10 01:42:58 +02:00

all_members has a structure:

{
    guild_id: {
        member_id: {Data here...}
    }
}

So m_id is actually a dict of all members in the g_id.

`all_members` has a structure: ```py { guild_id: { member_id: {Data here...} } } ``` So `m_id` is actually a dict of all members in the `g_id`.
Jackenmen (Migrated from github.com) commented 2020-10-10 17:34:04 +02:00

Doing this like that may result in the task not getting canceled if bot.add_cog() call fails (as an example, this may happen if there are command conflicts and the cog fails to load)

Doing this like that may result in the task not getting canceled *if* `bot.add_cog()` call fails (as an example, this may happen if there are command conflicts and the cog fails to load)
Jackenmen (Migrated from github.com) commented 2020-10-11 00:57:23 +02:00

Could we remove the user from the muted_users config as part of the task to avoid situations where the bot is being shutdown while someone was supposed to get unmuted or if maybe some other exception in a task occurs?

Could we remove the user from the muted_users config as part of the task to avoid situations where the bot is being shutdown while someone was supposed to get unmuted or if maybe some other exception in a task occurs?
Jackenmen (Migrated from github.com) commented 2020-10-11 00:59:02 +02:00

Cog disabling API needs to be handled here.

            if guild is None or await self.bot.cog_disabled_in_guild(self, guild):
Cog disabling API needs to be handled here. ```suggestion if guild is None or await self.bot.cog_disabled_in_guild(self, guild): ```
Jackenmen (Migrated from github.com) commented 2020-10-11 01:54:02 +02:00

Cog disabling API needs to be handled here.

            assert isinstance(channel, discord.TextChannel)
            if channel is None or await self.bot.cog_disabled_in_guild(self, channel.guild):
Cog disabling API needs to be handled here. ```suggestion assert isinstance(channel, discord.TextChannel) if channel is None or await self.bot.cog_disabled_in_guild(self, channel.guild): ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:21:19 +02:00

Should we do some logging when success is false?

Should we do some logging when `success` is false?
Jackenmen (Migrated from github.com) commented 2020-10-11 02:22:20 +02:00

Logging should not be translated.

                    log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:22:46 +02:00

Logging should not be translated.

                    log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:23:01 +02:00

Logging should not be translated.

                    log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:23:12 +02:00

Logging should not be translated.

                    log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:23:29 +02:00

Logging should not be translated.

                        log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:23:49 +02:00

Logging should not be translated.

                        log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:24:01 +02:00

Logging should not be translated.

                        log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:24:14 +02:00

Logging should not be translated.

                        log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:24:26 +02:00

Logging should not be translated.

                        log.error("Error creating modlog case", exc_info=e)
Logging should not be translated. ```suggestion log.error("Error creating modlog case", exc_info=e) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:25:36 +02:00

You probably meant to only include the mute's target, not mute's author in this if:

            if not member:
You probably meant to only include the mute's target, not mute's author in this if: ```suggestion if not member: ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:33:39 +02:00
            await self.config.guild(ctx.guild).sent_instructions.set(False)
```suggestion await self.config.guild(ctx.guild).sent_instructions.set(False) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:37:22 +02:00

This makes more sense to be limited to bot's admin role because it involves role-related functionality as well as changes other cog's settings that affect the whole guild.

    @checks.admin_or_permissions(manage_roles=True)
This makes more sense to be limited to bot's admin role because it involves role-related functionality as well as changes other cog's settings that affect the whole guild. ```suggestion @checks.admin_or_permissions(manage_roles=True) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 02:58:13 +02:00

I think it would be nice if we also applied these to category channels so that creating a new channel in the category automatically makes the appropriate channel overwrite. It is not required, I just think it would be nice.

Here's a code suggestion which works just fine as it is not required to only specify the overwrites that are actually related to the channel type:

        overs.send_messages = False
        overs.add_reactions = False
        overs.speak = False
I think it would be nice if we also applied these to category channels so that creating a new channel in the category automatically makes the appropriate channel overwrite. It is not required, I just think it would be nice. Here's a code suggestion which works just fine as it is not required to only specify the overwrites that are actually related to the channel type: ```suggestion overs.send_messages = False overs.add_reactions = False overs.speak = False ```
Jackenmen (Migrated from github.com) commented 2020-10-11 03:01:12 +02:00

pagify() only breaks on newline character by default:

                for page in pagify(msg, delims=[" "]):
`pagify()` only breaks on newline character by default: ```suggestion for page in pagify(msg, delims=[" "]): ```
Jackenmen (Migrated from github.com) commented 2020-10-11 03:05:59 +02:00

Removing the default mute time is a bit weird, because it requires you to pass an input that won't get considered as time by MuteTime. So just passing a random sequence of characters works, which I don't think is quite good here. This converter also accepts a reason which isn't that good either, but it is what currently allows you to reset default mute time.

Removing the default mute time is a bit weird, because it requires you to pass an input that won't get considered as time by `MuteTime`. So just passing a random sequence of characters works, which I don't think is quite good here. This converter also accepts a reason which isn't that good either, but it is what currently allows you to reset default mute time.
Jackenmen (Migrated from github.com) commented 2020-10-11 03:12:16 +02:00

Could you move the commands out of the translated string (e.g. using {command_1}, {command_2} format fields) so that translators don't try to translate it (which is a real concern and some of the messages in Red have already been adapted for this)?

Could you move the commands out of the translated string (e.g. using `{command_1}`, `{command_2}` format fields) so that translators don't try to translate it (which is a real concern and some of the messages in Red have already been adapted for this)?
Jackenmen (Migrated from github.com) commented 2020-10-11 03:16:45 +02:00

Is this check relevant for channel mutes that use overrides regardless?

Is this check relevant for channel mutes that use overrides regardless?
Jackenmen (Migrated from github.com) commented 2020-10-11 03:16:59 +02:00

Is this check relevant for channel mutes that use overrides regardless?

Is this check relevant for channel mutes that use overrides regardless?
Jackenmen (Migrated from github.com) commented 2020-10-11 19:20:31 +02:00

There's nothing to translate here + you missed a space:

                    msg += f"{user_str} "
There's nothing to translate here + you missed a space: ```suggestion msg += f"{user_str} " ```
Jackenmen (Migrated from github.com) commented 2020-10-11 19:22:24 +02:00

Depending on what was the purpose of clearing this, you might also want to clear config data for these users.

Depending on what was the purpose of clearing this, you might also want to clear config data for these users.
Jackenmen (Migrated from github.com) commented 2020-10-11 19:30:02 +02:00

Why not just use guild.get_channel() here?

Why not just use `guild.get_channel()` here?
Jackenmen (Migrated from github.com) commented 2020-10-11 19:33:31 +02:00

There's nothing to translate here.

                    msg += f"{user_str} "
There's nothing to translate here. ```suggestion msg += f"{user_str} " ```
Jackenmen (Migrated from github.com) commented 2020-10-11 19:35:54 +02:00

Users argument is not optional.

    @commands.command(usage="<users...> [time_and_reason]")
Users argument is not optional. ```suggestion @commands.command(usage="<users...> [time_and_reason]") ```
Jackenmen (Migrated from github.com) commented 2020-10-11 21:22:25 +02:00

For better translation support, you should have 2 separate strings for both plural forms.

For better translation support, you should have 2 separate strings for both plural forms.
Jackenmen (Migrated from github.com) commented 2020-10-11 21:24:54 +02:00

issue gets replaced on each iteration of the for loop above, so this will only send whatever was the last issue (or even not send anything at all if issue gets set to None on last iteration).

`issue` gets replaced on each iteration of the for loop above, so this will only send whatever was the last issue (or even not send anything at all if `issue` gets set to `None` on last iteration).
Jackenmen (Migrated from github.com) commented 2020-10-11 21:26:05 +02:00

Same as in the if above (if not success_list and issue in L712)

Same as in the if above (`if not success_list and issue` in L712)
Jackenmen (Migrated from github.com) commented 2020-10-11 22:36:32 +02:00

This is not true as it depends on the set default duration.

This is not true as it depends on the set default duration.
Jackenmen (Migrated from github.com) commented 2020-10-11 22:41:32 +02:00

For better translation support, you should have 2 separate strings for both plural forms.

For better translation support, you should have 2 separate strings for both plural forms.
Jackenmen (Migrated from github.com) commented 2020-10-11 22:46:51 +02:00

Maybe we should provide granularity here and mute everyone we can and only send errors for users we couldn't mute.

Maybe we should provide granularity here and mute everyone we can and only send errors for users we couldn't mute.
Jackenmen (Migrated from github.com) commented 2020-10-11 22:47:28 +02:00

Maybe we should provide granularity here and mute everyone we can and only send errors for users we couldn't mute.

Maybe we should provide granularity here and mute everyone we can and only send errors for users we couldn't mute.
Jackenmen (Migrated from github.com) commented 2020-10-11 22:51:36 +02:00

issue gets replaced on each iteration of the for loop above, so this will only send whatever was the last issue (or even not send anything at all if issue gets set to None on last iteration).

`issue` gets replaced on each iteration of the for loop above, so this will only send whatever was the last issue (or even not send anything at all if `issue` gets set to `None` on last iteration).
Jackenmen (Migrated from github.com) commented 2020-10-11 22:52:28 +02:00

Depending on what was the purpose of clearing this, you might also want to clear config data for these channels.

Depending on what was the purpose of clearing this, you might also want to clear config data for these channels.
Jackenmen (Migrated from github.com) commented 2020-10-11 23:04:28 +02:00
                    await self.config.channel(channel).muted_users.set(
                        self._channel_mutes[channel.id]
                    )
```suggestion await self.config.channel(channel).muted_users.set( self._channel_mutes[channel.id] ) ```
Jackenmen (Migrated from github.com) commented 2020-10-11 23:05:27 +02:00

Most of the strings here aren't wrapped in _() and therefore aren't translated.

Most of the strings here aren't wrapped in `_()` and therefore aren't translated.
Jackenmen (Migrated from github.com) commented 2020-10-18 20:56:31 +02:00

(optional) It could potentially help a future reader, if this had a type hint:

        self.mute_role_cache: Dict[int, int] = {}
(optional) It could potentially help a future reader, if this had a type hint: ```suggestion self.mute_role_cache: Dict[int, int] = {} ```
Jackenmen (Migrated from github.com) commented 2020-10-18 23:13:16 +02:00

Should we do some logging when success["success"] is false?

Should we do some logging when `success["success"]` is false?
Jackenmen (Migrated from github.com) commented 2020-10-18 23:20:53 +02:00
                        datetime.now(timezone.utc),
```suggestion datetime.now(timezone.utc), ```
Jackenmen (Migrated from github.com) commented 2020-10-18 23:21:56 +02:00

Role can't be both removed and added, so we can make this into an elif:

        elif mute_role in roles_added:
Role can't be both removed and added, so we can make this into an `elif`: ```suggestion elif mute_role in roles_added: ```
Jackenmen (Migrated from github.com) commented 2020-10-18 23:22:27 +02:00
                        datetime.now(timezone.utc),
```suggestion datetime.now(timezone.utc), ```
Jackenmen (Migrated from github.com) commented 2020-10-18 23:26:29 +02:00

Currently this will save to config any time there are some server mutes in cache, whether it's something that was just added or something that was already in there.

It would be good to only save to Config when we need to here.

Currently this will save to config any time there are *some* server mutes in cache, whether it's something that was just added or something that was already in there. It would be good to only save to Config when we need to here.
Jackenmen (Migrated from github.com) commented 2020-10-18 23:54:12 +02:00
                            datetime.now(timezone.utc),
```suggestion datetime.now(timezone.utc), ```
Jackenmen (Migrated from github.com) commented 2020-10-18 23:55:40 +02:00

Currently this will save to config no matter if there was any new mute or not. It would be nice, if this was changed to only save to Config when needed.

Currently this will save to config no matter if there was any new mute or not. It would be nice, if this was changed to only save to Config when needed.
Jackenmen (Migrated from github.com) commented 2020-10-19 00:49:12 +02:00

Overwrites will not be automatically unmuted.

That's not true though, is it (it doesn't seem to from the code and would also seem to be bad to remove such crucial part from overrides-based mutes)?

> Overwrites will not be automatically unmuted. That's not true though, is it (it doesn't seem to from the code and would also seem to be bad to remove such crucial part from overrides-based mutes)?
Jackenmen (Migrated from github.com) commented 2020-10-19 00:54:07 +02:00

Users argument is not optional.

        `<users...>` is a space separated list of usernames, ID's, or mentions.
Users argument is not optional. ```suggestion `<users...>` is a space separated list of usernames, ID's, or mentions. ```
Jackenmen (Migrated from github.com) commented 2020-10-19 00:57:24 +02:00

With this amount of context, it might be hard for translator to translate this properly, maybe something like this would be better? (I'm not sure)

                    duration_str = humanize_timedelta(timedelta=timedelta(**default_duration))
                    time = _(" for {duration}").format(duration=duration_str)
With this amount of context, it might be hard for translator to translate this properly, maybe something like this would be better? (I'm not sure) ```suggestion duration_str = humanize_timedelta(timedelta=timedelta(**default_duration)) time = _(" for {duration}").format(duration=duration_str) ```
Jackenmen (Migrated from github.com) commented 2020-10-19 00:58:22 +02:00

With this amount of context, it might be hard for translator to translate this properly, maybe something like this would be better? (I'm not sure)

                duration_str = humanize_timedelta(timedelta=timedelta(**duration))
                time = _(" for {duration}").format(duration=duration_str)
With this amount of context, it might be hard for translator to translate this properly, maybe something like this would be better? (I'm not sure) ```suggestion duration_str = humanize_timedelta(timedelta=timedelta(**duration)) time = _(" for {duration}").format(duration=duration_str) ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:06:05 +02:00

Users argument is required.

        name="mutechannel", aliases=["channelmute"], usage="<users...> [time_and_reason]"
Users argument is required. ```suggestion name="mutechannel", aliases=["channelmute"], usage="<users...> [time_and_reason]" ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:06:15 +02:00

Users argument is required.

        `[users...]` is a space separated list of usernames, ID's, or mentions.
Users argument is required. ```suggestion `[users...]` is a space separated list of usernames, ID's, or mentions. ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:08:46 +02:00

With this amount of context, it might be hard for translator to translate this properly, maybe something like this would be better? (I'm not sure)

                duration_str = humanize_timedelta(timedelta=timedelta(**duration))
                time = _(" for {duration}").format(duration=duration_str)
With this amount of context, it might be hard for translator to translate this properly, maybe something like this would be better? (I'm not sure) ```suggestion duration_str = humanize_timedelta(timedelta=timedelta(**duration)) time = _(" for {duration}").format(duration=duration_str) ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:09:04 +02:00

With this amount of context, it might be hard for translator to translate this properly, maybe something like this would be better? (I'm not sure)

                    duration_str = humanize_timedelta(timedelta=timedelta(**default_duration))
                    time = _(" for {duration}").format(duration=duration_str)
With this amount of context, it might be hard for translator to translate this properly, maybe something like this would be better? (I'm not sure) ```suggestion duration_str = humanize_timedelta(timedelta=timedelta(**default_duration)) time = _(" for {duration}").format(duration=duration_str) ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:10:19 +02:00

Users argument is required.

    @commands.command(usage="<users...> [reason]")
Users argument is required. ```suggestion @commands.command(usage="<users...> [reason]") ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:10:33 +02:00

Users argument is required.

        `[users...]` is a space separated list of usernames, ID's, or mentions.
Users argument is required. ```suggestion `[users...]` is a space separated list of usernames, ID's, or mentions. ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:11:52 +02:00

Same as in the if above (if not success_list and issue in L894)

Same as in the if above (`if not success_list and issue` in L894)
Jackenmen (Migrated from github.com) commented 2020-10-19 01:12:15 +02:00

Users argument is required.

    @commands.command(name="unmutechannel", aliases=["channelunmute"], usage="<users...> [reason]")
Users argument is required. ```suggestion @commands.command(name="unmutechannel", aliases=["channelunmute"], usage="<users...> [reason]") ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:12:29 +02:00

Users argument is required.

        `<users...>` is a space separated list of usernames, ID's, or mentions.
Users argument is required. ```suggestion `<users...>` is a space separated list of usernames, ID's, or mentions. ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:18:52 +02:00

Can you make this try-except to only wrap the relevant line? It would make it easier to figure out what's going here at a glance.

Can you make this `try-except` to only wrap the relevant line? It would make it easier to figure out what's going here at a glance.
Jackenmen (Migrated from github.com) commented 2020-10-19 01:31:52 +02:00

Most of the strings here aren't wrapped in _() and therefore aren't translated.

Most of the strings here aren't wrapped in `_()` and therefore aren't translated.
Jackenmen (Migrated from github.com) commented 2020-10-19 01:32:57 +02:00

Since this is a global constant, it should be all uppercase.

MUTE_UNMUTE_ISSUES = {
Since this is a global constant, it should be all uppercase. ```suggestion MUTE_UNMUTE_ISSUES = { ```
Jackenmen (Migrated from github.com) commented 2020-10-19 01:54:10 +02:00

This being after the API call means _temp will always be None in excepts

This being *after* the API call means `_temp` will always be `None` in `except`s
Jackenmen (Migrated from github.com) commented 2020-10-19 01:58:10 +02:00

This won't work for voice mutes.

This won't work for voice mutes.
Jackenmen (Migrated from github.com) commented 2020-10-19 01:59:34 +02:00

What's the benefit of having removed_users rather than just checking mutes list for the user ID?
I'm asking because in the latter case, we would not skip users that left the server while bot was offline (or for which Discord simply didn't fire an event, because why would Discord guarantee that the event gets fired?) and I don't know if there is a reason why this was done like that.

What's the benefit of having `removed_users` rather than just checking mutes list for the user ID? I'm asking because in the latter case, we would not skip users that left the server while bot was offline (or for which Discord simply didn't fire an event, because *why would Discord guarantee that the event gets fired?*) and I don't know if there is a reason *why* this was done like that.
@ -0,0 +304,4 @@
member = guild.get_member(user)
self._unmute_tasks[task_name] = asyncio.create_task(
self._auto_channel_unmute_user_multi(member, guild, channels)
)
Jackenmen (Migrated from github.com) commented 2020-10-11 02:08:22 +02:00

I wanted to just put the same comment as for this line in _handle_guild_unmutes() but looks like you missed appending to to_remove list completely here :)

Either way, the same comment technically still applies:
Could we remove the user from the muted_users config as part of the task to avoid situations where the bot is being shutdown while someone was supposed to get unmuted or if maybe some other exception in a task occurs?

I wanted to just put the same comment as for this line in `_handle_guild_unmutes()` but looks like you missed appending to `to_remove` list completely here :) Either way, the same comment technically still applies: Could we remove the user from the muted_users config as part of the task to avoid situations where the bot is being shutdown while someone was supposed to get unmuted or if maybe some other exception in a task occurs?
@ -0,0 +447,4 @@
"""
Used to handle the cache if a member manually has the muted role removed
"""
guild = before.guild
Jackenmen (Migrated from github.com) commented 2020-10-18 23:17:38 +02:00

Cog disabling API needs to be handled here.

        guild = before.guild
        if await self.bot.cog_disabled_in_guild(self, guild):
            return
Cog disabling API needs to be handled here. ```suggestion guild = before.guild if await self.bot.cog_disabled_in_guild(self, guild): return ```
@ -0,0 +754,4 @@
)
)
async def _check_for_mute_role(self, ctx: commands.Context) -> bool:
Jackenmen (Migrated from github.com) commented 2020-10-11 03:14:17 +02:00

Hmm, this instructions may also get sent to a user that has access to [p]mute but not to [p]muteset, I don't really know what we should (and whether we should) do about it though 🤔

Hmm, this instructions may also get sent to a user that has access to `[p]mute` but not to `[p]muteset`, I don't really know what we should (and whether we should) do about it though 🤔
@ -0,0 +1087,4 @@
issue_list = []
success_list = []
for user in users:
success = await self.channel_mute_user(
Jackenmen (Migrated from github.com) commented 2020-10-19 01:51:40 +02:00

It doesn't seem like old_overs are saved in this command.

It doesn't seem like `old_overs` are saved in this command.
@ -0,0 +1365,4 @@
if not guild.me.guild_permissions.manage_roles or role >= guild.me.top_role:
ret["reason"] = _(MUTE_UNMUTE_ISSUES["permissions_issue_role"])
return ret
try:
Jackenmen (Migrated from github.com) commented 2020-10-19 01:36:54 +02:00

Can you make this try-except to only wrap the relevant line? It would make it easier to figure out what's going here at a glance.

Can you make this `try-except` to only wrap the relevant line? It would make it easier to figure out what's going here at a glance.
@ -0,0 +1,235 @@
from typing import Optional, Tuple
Jackenmen (Migrated from github.com) commented 2020-10-10 00:45:11 +02:00

What he said 😄

What he said 😄
Jackenmen (Migrated from github.com) commented 2020-10-19 01:50:39 +02:00

Tuple unpacking here is incorrect.

Tuple unpacking here is incorrect.
TrustyJAID (Migrated from github.com) reviewed 2020-10-20 18:13:58 +02:00
@ -0,0 +754,4 @@
)
)
async def _check_for_mute_role(self, ctx: commands.Context) -> bool:
TrustyJAID (Migrated from github.com) commented 2020-10-20 18:13:57 +02:00

I think it's fine to leave this, the mod who uses the mute can escalate the problem with setting the role later and continue with the overwrites based mute.

I think it's fine to leave this, the mod who uses the mute can escalate the problem with setting the role later and continue with the overwrites based mute.
Jackenmen (Migrated from github.com) requested changes 2020-10-21 00:26:26 +02:00
Jackenmen (Migrated from github.com) left a comment

Follow-up review mostly for things that were changed since my last review, but I also found some smaller things I missed.

Follow-up review mostly for things that were changed since my last review, but I also found some smaller things I missed.
Jackenmen (Migrated from github.com) commented 2020-10-20 19:19:11 +02:00
            ctx.message.created_at.replace(tzinfo=timezone.utc),
```suggestion ctx.message.created_at.replace(tzinfo=timezone.utc), ```
Jackenmen (Migrated from github.com) commented 2020-10-20 19:19:39 +02:00
            ctx.message.created_at.replace(tzinfo=timezone.utc),
```suggestion ctx.message.created_at.replace(tzinfo=timezone.utc), ```
@ -0,0 +53,4 @@
class CompositeMetaClass(type(commands.Cog), type(ABC)):
"""
This allows the metaclass used for proper type detection to
coexist with discord.py's metaclass
Jackenmen (Migrated from github.com) commented 2020-10-20 22:11:27 +02:00
    Mute users temporarily or indefinitely.
```suggestion Mute users temporarily or indefinitely. ```
@ -0,0 +352,4 @@
if any(results):
reasons = {}
for result in results:
if not result:
Jackenmen (Migrated from github.com) commented 2020-10-20 23:23:41 +02:00
        """Set the notification channel for automatic unmute issues."""
```suggestion """Set the notification channel for automatic unmute issues.""" ```
Jackenmen (Migrated from github.com) commented 2020-10-20 23:28:00 +02:00

I think it would make more sense for this setting to be available only to people with admin role or those having manage channels permission as I don't think that most administrators would want moderators to have access to this kind of setting and it is a setting that affects all moderators and visibility of these notifications.

    @checks.admin_or_permissions(manage_channels=True)
*I think* it would make more sense for this setting to be available only to people with admin role or those having manage channels permission as I don't think that most administrators would want moderators to have access to this kind of setting and it is a setting that affects all moderators and visibility of these notifications. ```suggestion @checks.admin_or_permissions(manage_channels=True) ```
Jackenmen (Migrated from github.com) commented 2020-10-20 23:28:18 +02:00

There should probably be a way to reset this.

There should probably be a way to reset this.
@ -0,0 +503,4 @@
await self.config.guild(guild).muted_users.set(self._server_mutes[guild.id])
@commands.Cog.listener()
async def on_guild_channel_update(
Jackenmen (Migrated from github.com) commented 2020-10-21 00:06:21 +02:00

Could you add a cog disabling API check in this for the guild?

Could you add a cog disabling API check in this for the guild?
@ -0,0 +559,4 @@
await self.config.channel(after).muted_users.set(self._channel_mutes[after.id])
@commands.Cog.listener()
async def on_member_join(self, member: discord.Member):
Jackenmen (Migrated from github.com) commented 2020-10-21 00:06:37 +02:00

Could you add a cog disabling API check in this for the guild?

Could you add a cog disabling API check in this for the guild?
@ -0,0 +1,235 @@
from typing import Optional, Tuple
Jackenmen (Migrated from github.com) commented 2020-10-20 19:10:20 +02:00
                ctx.message.created_at.replace(tzinfo=timezone.utc),
```suggestion ctx.message.created_at.replace(tzinfo=timezone.utc), ```
Jackenmen (Migrated from github.com) commented 2020-10-20 19:13:04 +02:00

Looks like you accidentally reverted your change here and changed it back to mute_user() when copying the code from Mod. This should be using channel_mute_user(). Don't forget that channel_mute_user() has different return type :)

Looks like you accidentally reverted your change here and changed it back to `mute_user()` when copying the code from `Mod`. This should be using `channel_mute_user()`. Don't forget that `channel_mute_user()` has different return type :)
Jackenmen (Migrated from github.com) commented 2020-10-20 19:13:22 +02:00

Looks like you accidentally reverted your change here and changed it back to unmute_user() when copying the code from Mod. This should be using channel_unmute_user(). Don't forget that channel_unmute_user() has different return type :)

Looks like you accidentally reverted your change here and changed it back to `unmute_user()` when copying the code from `Mod`. This should be using `channel_unmute_user()`. Don't forget that `channel_unmute_user()` has different return type :)
@ -0,0 +81,4 @@
is provided the mute will use the set default time or indefinite if not set.
Examples:
`[p]voicemute @member1 @member2 spam 5 hours`
Jackenmen (Migrated from github.com) commented 2020-10-20 19:08:05 +02:00
            ctx.message.created_at.replace(tzinfo=timezone.utc),
```suggestion ctx.message.created_at.replace(tzinfo=timezone.utc), ```
@ -0,0 +122,4 @@
author = ctx.author
channel = user_voice_state.channel
audit_reason = get_audit_reason(author, reason)
Jackenmen (Migrated from github.com) commented 2020-10-20 19:09:08 +02:00
            ctx.message.created_at.replace(tzinfo=timezone.utc),
```suggestion ctx.message.created_at.replace(tzinfo=timezone.utc), ```
@ -0,0 +152,4 @@
msg = _("{users} has been muted in this channel{time}.")
if len(success_list) > 1:
msg = _("{users} have been muted in this channel{time}.")
await ctx.send(
Jackenmen (Migrated from github.com) commented 2020-10-20 19:01:20 +02:00
                _("Muted {user} in channel {channel.name}.").format(user=user, channel=channel)
```suggestion _("Muted {user} in channel {channel.name}.").format(user=user, channel=channel) ```
Jackenmen (Migrated from github.com) commented 2020-10-20 19:09:11 +02:00
                ctx.message.created_at.replace(tzinfo=timezone.utc),
```suggestion ctx.message.created_at.replace(tzinfo=timezone.utc), ```
@ -0,0 +216,4 @@
until=None,
channel=channel,
)
else:
Jackenmen (Migrated from github.com) commented 2020-10-20 19:01:28 +02:00
                _("Unmuted {user} in channel {channel.name}.").format(user=user, channel=channel)
```suggestion _("Unmuted {user} in channel {channel.name}.").format(user=user, channel=channel) ```
Jackenmen (Migrated from github.com) reviewed 2020-10-21 22:24:03 +02:00
@ -0,0 +63,4 @@
).format(perms=format_perms_list(required_perms)),
)
return True, None
Jackenmen (Migrated from github.com) commented 2020-10-21 22:14:46 +02:00

_voice_perm_check() sends an error message immediately which doesn't really play that well with how the rest of the command behave (as in, it returns errors at the end for the rest)

`_voice_perm_check()` sends an error message immediately which doesn't really play that well with how the rest of the command behave (as in, it returns errors at the end for the rest)
Jackenmen (Migrated from github.com) commented 2020-10-21 22:19:07 +02:00

_voice_perm_check() sends an error message immediately which doesn't really play that well with how the rest of the command behave (as in, it returns errors at the end for the rest)

`_voice_perm_check()` sends an error message immediately which doesn't really play that well with how the rest of the command behave (as in, it returns errors at the end for the rest)
Jackenmen (Migrated from github.com) requested changes 2020-10-21 23:22:07 +02:00
Jackenmen (Migrated from github.com) left a comment

smaller one cause I found a rather unfortunate bug 😄
I'll be continuing with functional review so expect more :)

smaller one cause I found a rather unfortunate bug 😄 I'll be continuing with functional review so expect more :)
@ -0,0 +1,1567 @@
import asyncio
Jackenmen (Migrated from github.com) commented 2020-10-21 22:49:07 +02:00

This string is also used in channel_unmute_user() method

This string is also used in `channel_unmute_user()` method
Jackenmen (Migrated from github.com) commented 2020-10-21 23:15:33 +02:00

Gotta unindent this for it to work 😬


        self._channel_mutes[channel.id][user.id] = {
            "author": author.id,
            "member": user.id,
            "until": until.timestamp() if until else None,
        }
Gotta unindent this for it to work 😬 ```suggestion self._channel_mutes[channel.id][user.id] = { "author": author.id, "member": user.id, "until": until.timestamp() if until else None, } ```
fixator10 commented 2020-10-22 11:26:00 +02:00 (Migrated from github.com)

Automatic unmute spams modlog like hell
Reproduce:

  1. [p]mute @ghost#0000 another one bites the test 45s
  2. Wait 45 sec
  3. Get 64 modlog entries for 32 channels: img

Settings:

{'sent_instructions': True, 'mute_role': None, 'notification_channel': None, 'muted_users': {}, 'default_time': {}}

Would be nice to have a showsettings command btw.

Got that on Draper's v3/edge branch.

Automatic unmute spams modlog like hell Reproduce: 1. `[p]mute @ghost#0000 another one bites the test 45s` 2. Wait 45 sec 3. Get 64 modlog entries for 32 channels: ![img](https://moeka.is-a-good-waifu.com/8jxsudq.png) Settings: ```py {'sent_instructions': True, 'mute_role': None, 'notification_channel': None, 'muted_users': {}, 'default_time': {}} ``` Would be nice to have a `showsettings` command btw. *Got that on Draper's `v3/edge` branch.*
Jackenmen (Migrated from github.com) requested changes 2020-10-24 00:29:40 +02:00
Jackenmen (Migrated from github.com) left a comment
  • overrides-based automatic unmutes go brrr (might be similar to the issue that I mentioned in the comment in L213)

  • Channel unmutes (as well as the bulk channel unmutes that are always called "Server mute") in modlog don't mention the channel(s) they refer to.

  • the dict format used everywhere in mutes for time storage seems a bit overcomplicated, why not just use timedelta.total_seconds()?

  • MuteTime converter is quite lax and detects time in the middle of text as well, is that intentional?

- overrides-based automatic unmutes go brrr (might be similar to the issue that I mentioned in the comment in L213) - Channel unmutes (as well as the bulk channel unmutes that are *always* called "Server mute") in modlog don't mention the channel(s) they refer to. - the dict format used everywhere in mutes for time storage seems a bit overcomplicated, why not just use `timedelta.total_seconds()`? - MuteTime converter is quite lax and detects time in the middle of text as well, is that intentional?
@ -0,0 +1,1567 @@
import asyncio
Jackenmen (Migrated from github.com) commented 2020-10-21 23:26:20 +02:00

Shouldn't this try-except only be wrapping the send() at the end of this method?

Shouldn't this `try-except` only be wrapping the send() at the end of this method?
Jackenmen (Migrated from github.com) commented 2020-10-21 23:29:21 +02:00
                        "I am unable to unmute {user} in {channel} for the following reason:\n{reason}"
```suggestion "I am unable to unmute {user} in {channel} for the following reason:\n{reason}" ```
Jackenmen (Migrated from github.com) commented 2020-10-21 23:30:43 +02:00

Because the mute is in the cache as well as in the config, this sends a message every 30 seconds.
image

Because the mute is in the cache as well as in the config, this sends a message every 30 seconds. ![image](https://user-images.githubusercontent.com/6032823/96789501-9903a400-13f5-11eb-93c9-c2e9fc7bfd14.png)
Jackenmen (Migrated from github.com) commented 2020-10-23 23:25:59 +02:00

This should be moved out of async with ctx.typing() block so that bot doesn't type while waiting for the reaction/message

This should be moved out of `async with ctx.typing()` block so that bot doesn't type *while* waiting for the reaction/message
Jackenmen (Migrated from github.com) commented 2020-10-23 23:26:13 +02:00

This should be moved out of async with ctx.typing() block so that bot doesn't type while waiting for the message. Also, was there any reason why [p]channelmute is the only command that uses ctx.send_interactive() rather than self.handle_issues()?

This should be moved out of `async with ctx.typing()` block so that bot doesn't type *while* waiting for the message. Also, was there any reason why `[p]channelmute` is the only command that uses `ctx.send_interactive()` rather than `self.handle_issues()`?
Jackenmen (Migrated from github.com) commented 2020-10-23 23:26:32 +02:00

This should be moved out of async with ctx.typing() block so that bot doesn't type while waiting for the reaction/message

This should be moved out of `async with ctx.typing()` block so that bot doesn't type *while* waiting for the reaction/message
Jackenmen (Migrated from github.com) commented 2020-10-23 23:26:48 +02:00

This should be moved out of async with ctx.typing() block so that bot doesn't type while waiting for the reaction/message

This should be moved out of `async with ctx.typing()` block so that bot doesn't type *while* waiting for the reaction/message
@ -0,0 +23,4 @@
MUTE_UNMUTE_ISSUES = {
"already_muted": _("That user is already muted in this channel."),
"already_unmuted": _("That user is not muted in this channel."),
Jackenmen (Migrated from github.com) commented 2020-10-23 23:36:45 +02:00

These strings aren't used anywhere.

This also means that you can use [p]channelmute and [p]channelunmute commands multiple times in a row and have it "mute" each time you use the command, which I'm not sure was intended. I guess it could
have been
convenient if it allowed making the mute last longer, but what it seems to actually be doing is just adding another mute onto the stack and later just spams with more modlog cases for unmuting:
image
image

These strings aren't used anywhere. This also means that you can use `[p]channelmute` and `[p]channelunmute` commands multiple times in a row and have it "mute" each time you use the command, which I'm not sure was intended. I guess it *could have been* convenient if it allowed making the mute last longer, but what it seems to actually be doing is just adding another mute onto the stack and later just spams with more modlog cases for unmuting: ![image](https://user-images.githubusercontent.com/6032823/97056870-48717f80-158a-11eb-97f6-4c3c1dafb219.png) ![image](https://user-images.githubusercontent.com/6032823/97056885-50312400-158a-11eb-9df8-26ba0935e343.png)
@ -0,0 +233,4 @@
del self._server_mutes[guild.id][data["member"]]
return
success = await self.unmute_user(guild, author, member, _("Automatic unmute"))
async with self.config.guild(guild).muted_users() as muted_users:
Jackenmen (Migrated from github.com) commented 2020-10-23 20:22:12 +02:00

Making separate method for basically same things seems overcomplicated. You could just add a silent kwarg (or possibly a better name: create_case that defaults to True) to _auto_channel_unmute_user() that would make the method not create the case.

Making separate method for basically same things seems overcomplicated. You could just add a `silent` kwarg (or possibly a better name: `create_case` that defaults to `True`) to `_auto_channel_unmute_user()` that would make the method not create the case.
@ -0,0 +476,4 @@
None,
_("Manually removed mute role"),
)
del self._server_mutes[guild.id][after.id]
Jackenmen (Migrated from github.com) commented 2020-10-23 20:23:48 +02:00

This one doesn't really tell the user much, did you mean to add it or have you added it accidentally?

This one doesn't really tell the user much, did you mean to add it or have you added it accidentally?
@ -0,0 +894,4 @@
@commands.command(usage="<users...> [time_and_reason]")
@commands.guild_only()
@checks.mod_or_permissions(manage_roles=True)
async def mute(
Jackenmen (Migrated from github.com) commented 2020-10-23 23:55:11 +02:00
  • (overrides-based mutes) Failure reasons for [p]mute User1 User2 get repeated without any difference, formatting is a bit broken too
    • While we're at failure reasons, they are quite spammy, maybe the reasons could be grouped so that the reason is just posted once and it would list all channels and/or users that the reason is related to

Example of what I'm talking about:
image

- (overrides-based mutes) Failure reasons for `[p]mute User1 User2` get repeated without any difference, formatting is a bit broken too - While we're at failure reasons, they are quite spammy, maybe the reasons could be grouped so that the reason is just posted once and it would list all channels and/or users that the reason is related to Example of what I'm talking about: ![image](https://user-images.githubusercontent.com/6032823/97057175-00069180-158b-11eb-9ec6-8d1c45d0fb56.png)
Jackenmen (Migrated from github.com) requested changes 2020-10-24 01:40:16 +02:00
Jackenmen (Migrated from github.com) left a comment
  • Modlog cases for automatic unmutes of voice mutes aren't using "vunmute" case type
  • Sometimes cases for channel/voice mutes seem to be posted twice, I can't quite reproduce it though
- Modlog cases for automatic unmutes of voice mutes aren't using "vunmute" case type - Sometimes cases for channel/voice mutes seem to be posted twice, I can't quite reproduce it though
@ -0,0 +1,1567 @@
import asyncio
Jackenmen (Migrated from github.com) commented 2020-10-24 00:55:12 +02:00

typo

            "Mute Role: {role}\nNotification Channel: {channel}\n"
typo ```suggestion "Mute Role: {role}\nNotification Channel: {channel}\n" ```
Jackenmen (Migrated from github.com) commented 2020-10-24 01:03:05 +02:00

Message written like that only makes sense for overrides-based mutes, not so much for role-based mutes.

Message written like that only makes sense for overrides-based mutes, not so much for role-based mutes.
@ -0,0 +23,4 @@
MUTE_UNMUTE_ISSUES = {
"already_muted": _("That user is already muted in this channel."),
"already_unmuted": _("That user is not muted in this channel."),
Jackenmen (Migrated from github.com) commented 2020-10-24 01:10:40 +02:00

This isn't unique to channel mutes, same can be observed with server mutes, both overrides-based and role-based.

This isn't unique to channel mutes, same can be observed with server mutes, both overrides-based and role-based.
@ -0,0 +416,4 @@
member,
channel.guild.me,
_("Automatic unmute"),
until=None,
Jackenmen (Migrated from github.com) commented 2020-10-24 01:39:33 +02:00

You should pass channel here.

                    until=None,
                    channel=channel,
You should pass channel here. ```suggestion until=None, channel=channel, ```
@ -0,0 +894,4 @@
@commands.command(usage="<users...> [time_and_reason]")
@commands.guild_only()
@checks.mod_or_permissions(manage_roles=True)
async def mute(
Jackenmen (Migrated from github.com) commented 2020-10-24 01:07:19 +02:00

To add here, the issue with failure reasons can also be seen with role-based mutes, although role-based mutes tend to have less permission-related issues so it's not as hard to read, but still, in case of different reason it can be non-obvious what reason refers to what:
image

Grouping reasons still seems like the best idea for addressing it to me, but feel free to figure out something else that makes it more user-friendly.

To add here, the issue with failure reasons can also be seen with role-based mutes, although role-based mutes tend to have less permission-related issues so it's not as hard to read, but still, in case of different reason it can be non-obvious what reason refers to what: ![image](https://user-images.githubusercontent.com/6032823/97060879-216c7b00-1595-11eb-9eb6-9be9e4feac9f.png) Grouping reasons still seems like the best idea for addressing it to me, but feel free to figure out something else that makes it more user-friendly.
@ -0,0 +1,235 @@
from typing import Optional, Tuple
Jackenmen (Migrated from github.com) commented 2020-10-24 01:14:00 +02:00
    @commands.command(name="voiceunmute", usage="<users...> [reason]")
```suggestion @commands.command(name="voiceunmute", usage="<users...> [reason]") ```
Jackenmen (Migrated from github.com) commented 2020-10-24 01:14:10 +02:00
    @commands.command(name="voicemute", usage="<users...> [time_and_reason]")
```suggestion @commands.command(name="voicemute", usage="<users...> [time_and_reason]") ```
TrustyJAID commented 2020-10-24 03:27:38 +02:00 (Migrated from github.com)

MuteTime converter is quite lax and detects time in the middle of text as well, is that intentional?

I can't imagine a lot of situations where a time delta would be used inside a reason field that isn't meant to be the time itself. It's more lax this way so that users can start with the time or end with it and not have to really think "which goes first again?" when they're trying to just get the mute done. If it's a problem you can specify time as well with t=2 hours but the idea was to be more user friendly.

> MuteTime converter is quite lax and detects time in the middle of text as well, is that intentional? I can't imagine a lot of situations where a time delta would be used inside a reason field that isn't meant to be the time itself. It's more lax this way so that users can start with the time or end with it and not have to really think "which goes first again?" when they're trying to just get the mute done. If it's a problem you can specify time as well with `t=2 hours` but the idea was to be more user friendly.
Jackenmen (Migrated from github.com) requested changes 2020-10-24 03:44:28 +02:00
Jackenmen (Migrated from github.com) left a comment
  • It seems that you only did the reason grouping for the notification channel, but not for any of the mute commands which is what my previous review comment was presenting.
  • Would it possible to check these before trying the channel mutes so that it only shows once for the whole user?
    image
  • I consider this a nit, but now that we send information when the user is already muted in the channel, it looks a bit weird for the server unmute (and mute too I guess):
    image
- It seems that you only did the reason grouping for the notification channel, but not for any of the mute commands which is what my previous review comment was presenting. - Would it possible to check these before trying the channel mutes so that it only shows once for the whole user? ![image](https://user-images.githubusercontent.com/6032823/97064914-0821f980-15aa-11eb-9d74-fb48ca3f1569.png) - I consider this a nit, but now that we send information when the user is already muted in the channel, it looks a bit weird for the server unmute (and mute too I guess): ![image](https://user-images.githubusercontent.com/6032823/97064950-3bfd1f00-15aa-11eb-85d2-afdc538e78d7.png)
@ -0,0 +254,4 @@
return
if not notification_channel.permissions_for(guild.me).send_messages:
return
error_msg = _(
Jackenmen (Migrated from github.com) commented 2020-10-24 03:20:35 +02:00

This name needs to contain guild id so that tasks for the same user can be spawned in 2 different servers.

This name needs to contain guild id so that tasks for the same user can be spawned in 2 different servers.
Jackenmen (Migrated from github.com) commented 2020-10-24 03:25:57 +02:00

_auto_channel_unmute_user() can return None in which case this tuple-unpacking will fail.

`_auto_channel_unmute_user()` can return `None` in which case this tuple-unpacking will fail.
Jackenmen (Migrated from github.com) commented 2020-10-24 03:27:00 +02:00

This is some weird blank line.

This is some weird blank line.
@ -0,0 +449,4 @@
"""
guild = before.guild
if await self.bot.cog_disabled_in_guild(self, guild):
return
Jackenmen (Migrated from github.com) commented 2020-10-24 03:18:35 +02:00

error_msg doesn't exist in this context

`error_msg` doesn't exist in this context
@ -0,0 +671,4 @@
@muteset.command(name="makerole")
@checks.admin_or_permissions(manage_roles=True)
@commands.bot_has_guild_permissions(manage_roles=True)
Jackenmen (Migrated from github.com) commented 2020-10-24 03:43:35 +02:00

First letter uppercase and add space as last char so that the message appended later in this code has proper spacing.

            msg += _("Are you sure you want to continue with channel overwrites? ")
First letter uppercase and add space as last char so that the message appended later in this code has proper spacing. ```suggestion msg += _("Are you sure you want to continue with channel overwrites? ") ```
Jackenmen (Migrated from github.com) commented 2020-10-24 03:43:54 +02:00

You already have one space below. Judging by next line, I'm also assuming you wanted to have a dot here, not a comma.

            "This server does not have a mute role setup."
You already have one space below. Judging by next line, I'm also assuming you wanted to have a dot here, not a comma. ```suggestion "This server does not have a mute role setup." ```
Jackenmen commented 2020-10-24 03:49:45 +02:00 (Migrated from github.com)

It's more lax this way so that users can start with the time or end with it and not have to really think "which goes first again?" when they're trying to just get the mute done. If it's a problem you can specify time as well with t=2 hours but the idea was to be more user friendly.

And I really like the idea of being more user friendly here, and I think it's really cool that you can start or end with the time. I was just wondering, if allowing to put it in the middle was also intended here or if it's just a bit unfortunate side effect.

> It's more lax this way so that users can start with the time or end with it and not have to really think "which goes first again?" when they're trying to just get the mute done. If it's a problem you can specify time as well with t=2 hours but the idea was to be more user friendly. And I really like the idea of being more user friendly here, and I think it's really cool that you can start or end with the time. I was just wondering, if allowing to put it in the middle was also intended here or if it's just a bit unfortunate side effect.
Jackenmen (Migrated from github.com) requested changes 2020-10-25 03:12:14 +01:00
Jackenmen (Migrated from github.com) left a comment

Once all changes that were requested so far (including the review comments in this review) are done, this should be in a mergeable state. I know it's easier said than done though, but I just wanted to let you know that I won't add anything else to my reviews than I already have (unless some new issues get introduced of course). And if you will need any help, feel free to ask :)

Now onto this review, aside from code comments, there's one thing that hasn't been included in them as it wasn't referring to one specific code part:

  • Channel overrides not being reapplied on guild join should be documented in some help docstrings and probably also sent instructions.
Once all changes that were requested so far (including the review comments in this review) are done, this should be in a mergeable state. I know it's easier said than done though, but I just wanted to let you know that I won't add anything else to my reviews than I already have (unless some new issues get introduced of course). And if you will need any help, feel free to ask :) Now onto *this review*, aside from code comments, there's one thing that hasn't been included in them as it wasn't referring to one specific code part: - Channel overrides not being reapplied on guild join should be documented in some help docstrings and probably also sent instructions.
@ -0,0 +1,1567 @@
import asyncio
Jackenmen (Migrated from github.com) commented 2020-10-25 00:05:33 +02:00

This default needs to be updated, here's one of errors I get due to current default value:

[2020-10-25 00:04:11] [ERROR] red: Exception in command 'muteset settings'
Traceback (most recent call last):
  File "C:\Users\Jakub\OneDrive\Dokumenty\Red-DiscordBot\.venv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "C:\Users\Jakub\OneDrive\Dokumenty\Red-DiscordBot\redbot\cogs\mutes\mutes.py", line 530, in show_mutes_settings
    default_time = timedelta(seconds=data["default_time"])
TypeError: unsupported type for timedelta seconds component: dict

Cog seems to be working fine when 0 is set as the default:

            "default_time": 0,
This default needs to be updated, here's one of errors I get due to current default value: ``` [2020-10-25 00:04:11] [ERROR] red: Exception in command 'muteset settings' Traceback (most recent call last): File "C:\Users\Jakub\OneDrive\Dokumenty\Red-DiscordBot\.venv\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped ret = await coro(*args, **kwargs) File "C:\Users\Jakub\OneDrive\Dokumenty\Red-DiscordBot\redbot\cogs\mutes\mutes.py", line 530, in show_mutes_settings default_time = timedelta(seconds=data["default_time"]) TypeError: unsupported type for timedelta seconds component: dict ``` Cog seems to be working fine when `0` is set as the default: ```suggestion "default_time": 0, ```
Jackenmen (Migrated from github.com) commented 2020-10-25 00:10:15 +02:00

Argument to humanize_timedelta() are keyword-only.

            time=humanize_timedelta(timedelta=default_time) if default_time else _("None"),

Alternatively you could just pass seconds directly to humanize_timedelta() and ditch the default_time variable.

Argument to `humanize_timedelta()` are keyword-only. ```suggestion time=humanize_timedelta(timedelta=default_time) if default_time else _("None"), ``` Alternatively you could just pass seconds directly to `humanize_timedelta()` and ditch the `default_time` variable.
Jackenmen (Migrated from github.com) commented 2020-10-25 00:54:07 +02:00

This is some weird blank line.

This is some weird blank line.
Jackenmen (Migrated from github.com) commented 2020-10-25 01:20:57 +02:00

What we actually need to be checking for here is the guild permission, not the channel-specific permission.

    @checks.bot_has_guild_permissions(manage_roles=True)
What we actually need to be checking for here is the guild permission, not the channel-specific permission. ```suggestion @checks.bot_has_guild_permissions(manage_roles=True) ```
Jackenmen (Migrated from github.com) commented 2020-10-25 02:35:08 +02:00

This doesn't work properly if override gets set to None state.

This doesn't work properly if override gets set to None state.
Jackenmen (Migrated from github.com) commented 2020-10-25 02:57:27 +01:00

I honestly think we should just have set this to True as the default to not encourage new users to use overrides-based mutes, but this might need to be brought up in the server.

I honestly think we should just have set this to `True` as the default to not encourage new users to use overrides-based mutes, but this might need to be brought up in the server.
@ -0,0 +247,4 @@
_("Automatic unmute"),
until=None,
)
else:
Jackenmen (Migrated from github.com) commented 2020-10-25 00:28:17 +02:00

This will keep sending messages infinitely for any errors. As an example of reproduction, you can role mute a user and then remove manage roles perm from the bot which will make the bot send messages infinitely in the notification channel.

This will keep sending messages infinitely for any errors. As an example of reproduction, you can role mute a user and then remove manage roles perm from the bot which will make the bot send messages infinitely in the notification channel.
@ -0,0 +257,4 @@
error_msg = _(
"I am unable to unmute {user} for the following reason:\n{reason}"
).format(user=member, reason=success["reason"])
try:
Jackenmen (Migrated from github.com) commented 2020-10-25 00:20:02 +02:00

We should be checking if we can send messages before making an API call using notification_channel.permissions_for(guild.me).send_messages and only catch Forbidden as last resort.

We should be checking if we can send messages before making an API call using `notification_channel.permissions_for(guild.me).send_messages` and only catch Forbidden as last resort.
@ -0,0 +373,4 @@
return None
if not notification_channel.permissions_for(guild.me).send_messages:
return None
try:
Jackenmen (Migrated from github.com) commented 2020-10-25 01:16:35 +02:00

We should be checking if we can send messages before making an API call using notification_channel.permissions_for(guild.me).send_messages and only catch Forbidden as last resort.

We should be checking if we can send messages before making an API call using `notification_channel.permissions_for(guild.me).send_messages` and only catch Forbidden as last resort.
@ -0,0 +434,4 @@
return None
if not notification_channel.permissions_for(channel.guild.me).send_messages:
return None
try:
Jackenmen (Migrated from github.com) commented 2020-10-25 01:16:46 +02:00

We should be checking if we can send messages before making an API call using notification_channel.permissions_for(guild.me).send_messages and only catch Forbidden as last resort.

We should be checking if we can send messages before making an API call using `notification_channel.permissions_for(guild.me).send_messages` and only catch Forbidden as last resort.
@ -0,0 +575,4 @@
if not role:
return
until = datetime.fromtimestamp(self._server_mutes[guild.id][member.id]["until"])
await self.mute_user(
Jackenmen (Migrated from github.com) commented 2020-10-25 02:22:19 +02:00

mute_user() expects until to be a datetime object.

`mute_user()` expects `until` to be a datetime object.
@ -0,0 +725,4 @@
overs.send_messages = False
overs.add_reactions = False
overs.speak = False
try:
Jackenmen (Migrated from github.com) commented 2020-10-25 01:21:41 +02:00

We should be checking if we can manage permissions in the channel before making an API call using channel.permissions_for(guild.me).manage_permissions and only catch Forbidden as last resort.

We should be checking if we can manage permissions in the channel before making an API call using `channel.permissions_for(guild.me).manage_permissions` and only catch Forbidden as last resort.
@ -0,0 +1300,4 @@
"member": user.id,
"until": until.timestamp() if until else None,
}
try:
Jackenmen (Migrated from github.com) commented 2020-10-25 01:23:55 +02:00

We should be checking if we can manage roles before making an API call using guild.me.guild_permissions.manage_roles and only catch Forbidden as last resort. The same goes for checking whether the role we're trying to assign can be assigned by the bot by checking its position against the bot's top role.
By doing both of these things, we could also easily have more specific errors here :)

We should be checking if we can manage roles before making an API call using `guild.me.guild_permissions.manage_roles` and only catch Forbidden as last resort. The same goes for checking whether the role we're trying to assign can be assigned by the bot by checking its position against the bot's top role. By doing both of these things, we could also easily have more specific errors here :)
@ -0,0 +1365,4 @@
if not guild.me.guild_permissions.manage_roles or role >= guild.me.top_role:
ret["reason"] = _(MUTE_UNMUTE_ISSUES["permissions_issue_role"])
return ret
try:
Jackenmen (Migrated from github.com) commented 2020-10-25 00:33:19 +02:00

We should be checking if we can manage roles before making an API call using guild.me.guild_permissions.manage_roles and only catch Forbidden as last resort. The same goes for checking whether the role we're trying to assign can be assigned by the bot by checking its position against the bot's top role.
By doing both of these things, we could also easily have more specific errors here :)

We should be checking if we can manage roles before making an API call using `guild.me.guild_permissions.manage_roles` and only catch Forbidden as last resort. The same goes for checking whether the role we're trying to assign can be assigned by the bot by checking its position against the bot's top role. By doing both of these things, we could also easily have more specific errors here :)
@ -0,0 +1443,4 @@
"member": user.id,
"until": until.timestamp() if until else None,
}
try:
Jackenmen (Migrated from github.com) commented 2020-10-25 01:25:01 +02:00

We should be checking if we can manage permissions in the channel before making an API call using channel.permissions_for(guild.me).manage_permissions and only catch Forbidden as last resort.

We should be checking if we can manage permissions in the channel before making an API call using `channel.permissions_for(guild.me).manage_permissions` and only catch Forbidden as last resort.
@ -0,0 +1530,4 @@
"channel": channel,
"reason": _(MUTE_UNMUTE_ISSUES["permissions_issue_channel"]),
}
try:
Jackenmen (Migrated from github.com) commented 2020-10-25 01:24:50 +02:00

We should be checking if we can manage permissions in the channel before making an API call using channel.permissions_for(guild.me).manage_permissions and only catch Forbidden as last resort.

We should be checking if we can manage permissions in the channel before making an API call using `channel.permissions_for(guild.me).manage_permissions` and only catch Forbidden as last resort.
Jackenmen (Migrated from github.com) requested changes 2020-10-25 17:52:32 +01:00
Jackenmen (Migrated from github.com) left a comment

Aside from the code comments, it looks like there's still one thing that wasn't addressed and/or answered to (quote rephrased to better explain what I meant):

  • "Multi" channel unmutes in modlog don't mention the channel(s) they refer to. Maybe it should be at least put somewhere in the reason since we can't set multiple channels on a modlog entry?

This might be the last review before approval - I still need to do some testing with the newly introduced changes so there is a chance I'll find some bug, but if I don't, it will be time for approval.

Aside from the code comments, it looks like there's still one thing that wasn't addressed and/or answered to (quote rephrased to better explain what I meant): > - "Multi" channel unmutes in modlog don't mention the channel(s) they refer to. Maybe it should be at least put somewhere in the reason since we can't set multiple channels on a modlog entry? --- This might be the last review before approval - I still need to do some testing with the newly introduced changes so there is a chance I'll find some bug, but if I don't, it will be time for approval.
@ -0,0 +1,1567 @@
import asyncio
Jackenmen (Migrated from github.com) commented 2020-10-25 17:28:59 +01:00

As said in the previous review comment

The same goes for checking whether the role we're trying to assign can be assigned by the bot by checking its position against the bot's top role.

If you want to, you can split this into 2 errors, but I won't require that.

            if (
                not guild.me.guild_permissions.manage_roles
                or role >= guild.me.top_role
            ):
As said in the previous review comment > The same goes for checking whether the role we're trying to assign can be assigned by the bot by checking its position against the bot's top role. If you want to, you can split this into 2 errors, but I won't require that. ```suggestion if ( not guild.me.guild_permissions.manage_roles or role >= guild.me.top_role ): ```
Jackenmen (Migrated from github.com) commented 2020-10-25 17:29:44 +01:00

As said in the previous review comment

The same goes for checking whether the role we're trying to assign can be assigned by the bot by checking its position against the bot's top role.

If you want to, you can split this into 2 errors, but I won't require that.

            if (
                not guild.me.guild_permissions.manage_roles
                or role >= guild.me.top_role
            ):
As said in the previous review comment > The same goes for checking whether the role we're trying to assign can be assigned by the bot by checking its position against the bot's top role. If you want to, you can split this into 2 errors, but I won't require that. ```suggestion if ( not guild.me.guild_permissions.manage_roles or role >= guild.me.top_role ): ```
@ -0,0 +743,4 @@
if not time:
await self.config.guild(ctx.guild).default_time.clear()
await ctx.send(_("Default mute time removed."))
else:
Jackenmen (Migrated from github.com) commented 2020-10-25 16:59:13 +01:00

Missing space

                "who has been muted may leave and re-join and no longer be muted. "
Missing space ```suggestion "who has been muted may leave and re-join and no longer be muted. " ```
@ -0,0 +1270,4 @@
"channels": [],
"user": user,
}
# TODO: This typing is ugly and should probably be an object on its own
Jackenmen (Migrated from github.com) commented 2020-10-25 17:13:38 +01:00

Unused variable

Unused variable ```suggestion ```
Jackenmen (Migrated from github.com) reviewed 2020-10-25 19:16:19 +01:00
@ -0,0 +317,4 @@
)
async def _auto_channel_unmute_user_multi(
self, member: discord.Member, guild: discord.Guild, channels: Dict[int, dict]
Jackenmen (Migrated from github.com) commented 2020-10-25 19:16:18 +01:00

I would want to propose alternative formatting for this (you can write the code differently, just wanted to present what I mean by using code):

        modlog_reason = _("Automatic unmute")
        channel_list = humanize_list(
            [c.mention for c in unmuted_channels if c is not None]
        )
        if channel_list:
            modlog_reason += _("\nUnmuted in channels: ") + channel_list
I would want to propose alternative formatting for this (you can write the code differently, just wanted to present what I mean by using code): ```suggestion modlog_reason = _("Automatic unmute") channel_list = humanize_list( [c.mention for c in unmuted_channels if c is not None] ) if channel_list: modlog_reason += _("\nUnmuted in channels: ") + channel_list ```
Jackenmen (Migrated from github.com) requested changes 2020-10-25 23:02:04 +01:00
Jackenmen (Migrated from github.com) left a comment
  • Channel mutes are only saved to cache, they don't persist on bot restart (applies to both overrides-based [p]mute and to [p]channelmute and [p]voicemute commands)
  • Case for [p]vocemute doesn't contain the duration/until fields
  • It seems that Administrator check is done before channel mutes and is shown nicely, but hierarchy check is done during channel mutes and lists all channels it failed for:
    image
    What can also be seen on the screenshot below is that there's a nice empty line between AlmostSlime and Jackenmen that improves readability, but such an empty line doesn't exist between Jackenmen and KslibLivxud.
    Besides what I mentioned, I think we could do one more thing improving readability - make the different reasons form a list by preceding each reason with -:
    image
  • not very critical, but the check for manage roles permission could additionally be checked before proceeding to loop through users so that this doesn't happen:
    image
  • the error for missing Manage Permissions in the channel is inaccurate (it's talking about role hierarchy that doesn't apply to channel permissions at all + the bot doesn't need the Manage Roles permission but rather the Manage Permissions permission in that specific channel):
    image
- Channel mutes are only saved to cache, they don't persist on bot restart (applies to both overrides-based `[p]mute` and to `[p]channelmute` and `[p]voicemute` commands) - Case for `[p]vocemute` doesn't contain the duration/until fields - It seems that Administrator check is done *before* channel mutes and is shown nicely, but hierarchy check is done *during* channel mutes and lists all channels it failed for: ![image](https://user-images.githubusercontent.com/6032823/97117559-cd80a400-1704-11eb-99b6-b63ba36e2607.png) What can also be seen on the screenshot below is that there's a nice empty line between `AlmostSlime` and `Jackenmen` that improves readability, but such an empty line doesn't exist between `Jackenmen` and `KslibLivxud`. Besides what I mentioned, I think we could do one more thing improving readability - make the different reasons form a list by preceding each reason with `-`: ![image](https://user-images.githubusercontent.com/6032823/97118009-de7ee480-1707-11eb-947f-ea024f11c21e.png) - not very critical, but the check for manage roles permission could additionally be checked before proceeding to loop through users so that this doesn't happen: ![image](https://user-images.githubusercontent.com/6032823/97118836-94e4c880-170c-11eb-8189-34548842aa42.png) - the error for missing Manage Permissions in the channel is inaccurate (it's talking about role hierarchy that doesn't apply to channel permissions at all + the bot doesn't need the Manage Roles permission but rather the Manage Permissions permission in that specific channel): ![image](https://user-images.githubusercontent.com/6032823/97118884-dd9c8180-170c-11eb-923d-862998efd4b0.png)
@ -0,0 +1,1567 @@
import asyncio
Jackenmen (Migrated from github.com) commented 2020-10-25 21:28:37 +01:00

These raise when user_id isn't in after_perms.

These raise when `user_id` isn't in `after_perms`.
Jackenmen (Migrated from github.com) approved these changes 2020-10-26 02:50:53 +01:00
Jackenmen (Migrated from github.com) left a comment

It's that time! LGTM, let's ship it! 😏
Thanks for all the work on this @TrustyJAID and thanks for all the help with testing to our contributors ❤️

It's that time! LGTM, let's ship it! 😏 Thanks for all the work on this @TrustyJAID and thanks for all the help with testing to our contributors ❤️
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!3634
No description provided.