diff options
| author | 2020-06-16 12:40:12 -0700 | |
|---|---|---|
| committer | 2020-06-16 12:42:41 -0700 | |
| commit | 6fe0bc1c9ce35459b7d9b5bd2309b41dcc4c0dcc (patch) | |
| tree | 17a05bc77b2839cf7258e894013094b66af17144 | |
| parent | Revise inaccurate typehint for Optional reason (diff) | |
Add optional type annotations to reason in pardon funcs
| -rw-r--r-- | bot/cogs/moderation/infractions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py index 3db788eb9..f7747e7f8 100644 --- a/bot/cogs/moderation/infractions.py +++ b/bot/cogs/moderation/infractions.py @@ -298,7 +298,7 @@ class Infractions(InfractionScheduler, commands.Cog): # endregion # region: Base pardon functions - async def pardon_mute(self, user_id: int, guild: discord.Guild, reason: str) -> t.Dict[str, str]: + async def pardon_mute(self, user_id: int, guild: discord.Guild, reason: t.Optional[str]) -> t.Dict[str, str]: """Remove a user's muted role, DM them a notification, and return a log dict.""" user = guild.get_member(user_id) log_text = {} @@ -324,7 +324,7 @@ class Infractions(InfractionScheduler, commands.Cog): return log_text - async def pardon_ban(self, user_id: int, guild: discord.Guild, reason: str) -> t.Dict[str, str]: + async def pardon_ban(self, user_id: int, guild: discord.Guild, reason: t.Optional[str]) -> t.Dict[str, str]: """Remove a user's ban on the Discord guild and return a log dict.""" user = discord.Object(user_id) log_text = {} |