From 166fa15bc13105e3485af70ea0f48fc0eaa5acf0 Mon Sep 17 00:00:00 2001 From: Kevin Wang <38193800+kevin1015wang@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:43:01 -0500 Subject: [PATCH 1/7] Added Functionality to Require Mod Reasons --- docs/cog_guides/mod.rst | 22 +++++++++++++++++++ redbot/cogs/mod/kickban.py | 44 +++++++++++++++++++++++++++++++++++++ redbot/cogs/mod/mod.py | 1 + redbot/cogs/mod/settings.py | 24 ++++++++++++++++++++ 4 files changed, 91 insertions(+) diff --git a/docs/cog_guides/mod.rst b/docs/cog_guides/mod.rst index c8dc7da91dc..bd255d57cca 100644 --- a/docs/cog_guides/mod.rst +++ b/docs/cog_guides/mod.rst @@ -268,6 +268,28 @@ and reason as to why they were kicked/banned. .. _mod-command-modset-hierarchy: +""""""""" +modset reason +""""""""" + +**Syntax** + +.. code-block:: none + + [p]modset reason [enabled] + +**Description** + +Toggle whether a reason is required for mod actions. + +If this is enabled, the bot will require a reason to be provided for all mod actions. + +**Arguments** + +* ``[enabled]``: Whether a reason should be required when performing mod actions. |bool-input| + +.. _mod-command-modset-hierarchy: + """""""""""""""" modset hierarchy """""""""""""""" diff --git a/redbot/cogs/mod/kickban.py b/redbot/cogs/mod/kickban.py index 28e7f13fd9c..a4c186ead8e 100644 --- a/redbot/cogs/mod/kickban.py +++ b/redbot/cogs/mod/kickban.py @@ -117,6 +117,10 @@ async def ban_user( removed_temp = False + if await self.config.guild(guild).mod_reason(): + if reason is None: + return False, _("You must provide a reason for the ban.") + if not (0 <= days <= 7): return False, _("Invalid days. Must be between 0 and 7.") @@ -303,6 +307,11 @@ async def kick(self, ctx: commands.Context, member: discord.Member, *, reason: s author = ctx.author guild = ctx.guild + if await self.config.guild(guild).mod_reason(): + if reason is None: + await ctx.send(_("You must provide a reason for the kick.")) + return + if author == member: await ctx.send( _("I cannot let you do that. Self-harm is bad {emoji}").format( @@ -428,6 +437,11 @@ async def massban( errors = {} upgrades = [] + if await self.config.guild(ctx.guild).mod_reason(): + if reason is None: + await ctx.send(_("You must provide a reason for the massban.")) + return + async def show_results(): text = _("Banned {num} users from the server.").format( num=humanize_number(len(banned)) @@ -605,6 +619,11 @@ async def tempban( guild = ctx.guild author = ctx.author + if await self.config.guild(guild).mod_reason(): + if reason is None: + await ctx.send(_("You must provide a reason for the tempban.")) + return + if author == member: await ctx.send( _("I cannot let you do that. Self-harm is bad {}").format("\N{PENSIVE FACE}") @@ -684,6 +703,11 @@ async def softban(self, ctx: commands.Context, member: discord.Member, *, reason guild = ctx.guild author = ctx.author + if await self.config.guild(guild).mod_reason(): + if reason is None: + await ctx.send(_("You must provide a reason for the softban.")) + return + if author == member: await ctx.send( _("I cannot let you do that. Self-harm is bad {emoji}").format( @@ -771,6 +795,11 @@ async def voicekick( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Kick a member from a voice channel.""" + if await self.config.guild(ctx.guild).mod_reason(): + if reason is None: + await ctx.send(_("You must provide a reason for the voicekick.")) + return + author = ctx.author guild = ctx.guild user_voice_state: discord.VoiceState = member.voice @@ -818,6 +847,11 @@ async def voiceunban( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Unban a user from speaking and listening in the server's voice channels.""" + if await self.config.guild(ctx.guild).mod_reason(): + if reason is None: + await ctx.send(_("You must provide a reason for the voiceunban.")) + return + user_voice_state = member.voice if ( await self._voice_perm_check( @@ -859,6 +893,11 @@ async def voiceunban( @commands.admin_or_permissions(mute_members=True, deafen_members=True) async def voiceban(self, ctx: commands.Context, member: discord.Member, *, reason: str = None): """Ban a user from speaking and listening in the server's voice channels.""" + if await self.config.guild(ctx.guild).mod_reason(): + if reason is None: + await ctx.send(_("You must provide a reason for the voiceban.")) + return + user_voice_state: discord.VoiceState = member.voice if ( await self._voice_perm_check( @@ -908,6 +947,11 @@ async def unban( 1. Copy it from the mod log case (if one was created), or 2. Enable Developer Mode, go to Bans in this server's settings, right-click the user and select 'Copy ID'. """ + if await self.config.guild(ctx.guild).mod_reason(): + if reason is None: + await ctx.send(_("You must provide a reason for the unban.")) + return + guild = ctx.guild author = ctx.author audit_reason = get_audit_reason(ctx.author, reason, shorten=True) diff --git a/redbot/cogs/mod/mod.py b/redbot/cogs/mod/mod.py index 3915ce0ce46..12bbbda6d95 100644 --- a/redbot/cogs/mod/mod.py +++ b/redbot/cogs/mod/mod.py @@ -57,6 +57,7 @@ class Mod( "reinvite_on_unban": False, "current_tempbans": [], "dm_on_kickban": False, + "mod_reason": False, "default_days": 0, "default_tempban_duration": 60 * 60 * 24, "track_nicknames": True, diff --git a/redbot/cogs/mod/settings.py b/redbot/cogs/mod/settings.py index 298ed10a590..4858034e6c5 100644 --- a/redbot/cogs/mod/settings.py +++ b/redbot/cogs/mod/settings.py @@ -370,6 +370,30 @@ async def dm(self, ctx: commands.Context, enabled: bool = None): _("Bot will no longer attempt to send a DM to user before kick and ban.") ) + @modset.command() + @commands.guild_only() + # add command for setting reason requirement for mod actions + async def reason(self, ctx: commands.Context, enabled: bool = None): + """ + Toggle whether a reason is required for mod actions. + + If this is enabled, the bot will require a reason to be provided for all mod actions. + """ + guild = ctx.guild + if enabled is None: + setting = await self.config.guild(guild).mod_reason() + await ctx.send( + _("Mod action reason requirement is currently set to: {setting}").format( + setting=setting + ) + ) + return + await self.config.guild(guild).mod_reason.set(enabled) + if enabled: + await ctx.send(_("Bot will now require a reason for all mod actions.")) + else: + await ctx.send(_("Bot will no longer require a reason for all mod actions.")) + @modset.command() @commands.guild_only() async def defaultdays(self, ctx: commands.Context, days: int = 0): From cfbd401b1180497548e55fc578d582f00be589d6 Mon Sep 17 00:00:00 2001 From: Kevin Wang <38193800+kevin1015wang@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:06:00 -0500 Subject: [PATCH 2/7] Renamed mod reason setting to requirereason --- docs/cog_guides/mod.rst | 10 +++++----- redbot/cogs/mod/settings.py | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/cog_guides/mod.rst b/docs/cog_guides/mod.rst index bd255d57cca..869ef3f5796 100644 --- a/docs/cog_guides/mod.rst +++ b/docs/cog_guides/mod.rst @@ -266,17 +266,17 @@ and reason as to why they were kicked/banned. * ``[enabled]``: Whether a message should be sent to a user when they are kicked/banned. |bool-input| -.. _mod-command-modset-hierarchy: +.. _mod-command-modset-reason: -""""""""" -modset reason -""""""""" +"""""""""""""""""""" +modset requirereason +"""""""""""""""""""" **Syntax** .. code-block:: none - [p]modset reason [enabled] + [p]modset requirereason [enabled] **Description** diff --git a/redbot/cogs/mod/settings.py b/redbot/cogs/mod/settings.py index 4858034e6c5..19b60456587 100644 --- a/redbot/cogs/mod/settings.py +++ b/redbot/cogs/mod/settings.py @@ -372,8 +372,7 @@ async def dm(self, ctx: commands.Context, enabled: bool = None): @modset.command() @commands.guild_only() - # add command for setting reason requirement for mod actions - async def reason(self, ctx: commands.Context, enabled: bool = None): + async def requirereason(self, ctx: commands.Context, enabled: bool = None): """ Toggle whether a reason is required for mod actions. From 7948058d5b73bae4105d60708f3a763c2783b46c Mon Sep 17 00:00:00 2001 From: Kevin Wang <38193800+kevin1015wang@users.noreply.github.com> Date: Sat, 23 Nov 2024 18:23:55 -0500 Subject: [PATCH 3/7] Read mod_reason entry only if reason is None --- redbot/cogs/mod/kickban.py | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/redbot/cogs/mod/kickban.py b/redbot/cogs/mod/kickban.py index a4c186ead8e..daf24eadbd1 100644 --- a/redbot/cogs/mod/kickban.py +++ b/redbot/cogs/mod/kickban.py @@ -117,8 +117,8 @@ async def ban_user( removed_temp = False - if await self.config.guild(guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(guild).mod_reason(): return False, _("You must provide a reason for the ban.") if not (0 <= days <= 7): @@ -307,8 +307,8 @@ async def kick(self, ctx: commands.Context, member: discord.Member, *, reason: s author = ctx.author guild = ctx.guild - if await self.config.guild(guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(guild).mod_reason(): await ctx.send(_("You must provide a reason for the kick.")) return @@ -437,8 +437,8 @@ async def massban( errors = {} upgrades = [] - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the massban.")) return @@ -619,8 +619,8 @@ async def tempban( guild = ctx.guild author = ctx.author - if await self.config.guild(guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(guild).mod_reason(): await ctx.send(_("You must provide a reason for the tempban.")) return @@ -703,8 +703,8 @@ async def softban(self, ctx: commands.Context, member: discord.Member, *, reason guild = ctx.guild author = ctx.author - if await self.config.guild(guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(guild).mod_reason(): await ctx.send(_("You must provide a reason for the softban.")) return @@ -795,8 +795,8 @@ async def voicekick( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Kick a member from a voice channel.""" - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the voicekick.")) return @@ -847,8 +847,8 @@ async def voiceunban( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Unban a user from speaking and listening in the server's voice channels.""" - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the voiceunban.")) return @@ -893,8 +893,8 @@ async def voiceunban( @commands.admin_or_permissions(mute_members=True, deafen_members=True) async def voiceban(self, ctx: commands.Context, member: discord.Member, *, reason: str = None): """Ban a user from speaking and listening in the server's voice channels.""" - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the voiceban.")) return @@ -947,8 +947,8 @@ async def unban( 1. Copy it from the mod log case (if one was created), or 2. Enable Developer Mode, go to Bans in this server's settings, right-click the user and select 'Copy ID'. """ - if await self.config.guild(ctx.guild).mod_reason(): - if reason is None: + if reason is None: + if await self.config.guild(ctx.guild).mod_reason(): await ctx.send(_("You must provide a reason for the unban.")) return From 00898f3c2d8f84814369f1dd9648c6cf0f7035b6 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Tue, 24 Dec 2024 01:50:16 +0100 Subject: [PATCH 4/7] Flatten if blocks --- redbot/cogs/mod/kickban.py | 61 ++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/redbot/cogs/mod/kickban.py b/redbot/cogs/mod/kickban.py index daf24eadbd1..8044e5f83f3 100644 --- a/redbot/cogs/mod/kickban.py +++ b/redbot/cogs/mod/kickban.py @@ -117,9 +117,8 @@ async def ban_user( removed_temp = False - if reason is None: - if await self.config.guild(guild).mod_reason(): - return False, _("You must provide a reason for the ban.") + if reason is None and await self.config.guild(guild).mod_reason(): + return False, _("You must provide a reason for the ban.") if not (0 <= days <= 7): return False, _("Invalid days. Must be between 0 and 7.") @@ -307,10 +306,9 @@ async def kick(self, ctx: commands.Context, member: discord.Member, *, reason: s author = ctx.author guild = ctx.guild - if reason is None: - if await self.config.guild(guild).mod_reason(): - await ctx.send(_("You must provide a reason for the kick.")) - return + if reason is None and await self.config.guild(guild).mod_reason(): + await ctx.send(_("You must provide a reason for the kick.")) + return if author == member: await ctx.send( @@ -437,10 +435,9 @@ async def massban( errors = {} upgrades = [] - if reason is None: - if await self.config.guild(ctx.guild).mod_reason(): - await ctx.send(_("You must provide a reason for the massban.")) - return + if reason is None and await self.config.guild(ctx.guild).mod_reason(): + await ctx.send(_("You must provide a reason for the massban.")) + return async def show_results(): text = _("Banned {num} users from the server.").format( @@ -619,10 +616,9 @@ async def tempban( guild = ctx.guild author = ctx.author - if reason is None: - if await self.config.guild(guild).mod_reason(): - await ctx.send(_("You must provide a reason for the tempban.")) - return + if reason is None and await self.config.guild(guild).mod_reason(): + await ctx.send(_("You must provide a reason for the tempban.")) + return if author == member: await ctx.send( @@ -703,10 +699,9 @@ async def softban(self, ctx: commands.Context, member: discord.Member, *, reason guild = ctx.guild author = ctx.author - if reason is None: - if await self.config.guild(guild).mod_reason(): - await ctx.send(_("You must provide a reason for the softban.")) - return + if reason is None and await self.config.guild(guild).mod_reason(): + await ctx.send(_("You must provide a reason for the softban.")) + return if author == member: await ctx.send( @@ -795,10 +790,9 @@ async def voicekick( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Kick a member from a voice channel.""" - if reason is None: - if await self.config.guild(ctx.guild).mod_reason(): - await ctx.send(_("You must provide a reason for the voicekick.")) - return + if reason is None and await self.config.guild(ctx.guild).mod_reason(): + await ctx.send(_("You must provide a reason for the voicekick.")) + return author = ctx.author guild = ctx.guild @@ -847,10 +841,9 @@ async def voiceunban( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Unban a user from speaking and listening in the server's voice channels.""" - if reason is None: - if await self.config.guild(ctx.guild).mod_reason(): - await ctx.send(_("You must provide a reason for the voiceunban.")) - return + if reason is None and await self.config.guild(ctx.guild).mod_reason(): + await ctx.send(_("You must provide a reason for the voiceunban.")) + return user_voice_state = member.voice if ( @@ -893,10 +886,9 @@ async def voiceunban( @commands.admin_or_permissions(mute_members=True, deafen_members=True) async def voiceban(self, ctx: commands.Context, member: discord.Member, *, reason: str = None): """Ban a user from speaking and listening in the server's voice channels.""" - if reason is None: - if await self.config.guild(ctx.guild).mod_reason(): - await ctx.send(_("You must provide a reason for the voiceban.")) - return + if reason is None and await self.config.guild(ctx.guild).mod_reason(): + await ctx.send(_("You must provide a reason for the voiceban.")) + return user_voice_state: discord.VoiceState = member.voice if ( @@ -947,10 +939,9 @@ async def unban( 1. Copy it from the mod log case (if one was created), or 2. Enable Developer Mode, go to Bans in this server's settings, right-click the user and select 'Copy ID'. """ - if reason is None: - if await self.config.guild(ctx.guild).mod_reason(): - await ctx.send(_("You must provide a reason for the unban.")) - return + if reason is None and await self.config.guild(ctx.guild).mod_reason(): + await ctx.send(_("You must provide a reason for the unban.")) + return guild = ctx.guild author = ctx.author From 1f3de7fc8d3a0aa1fcd5b16d8298409b5d468025 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Tue, 24 Dec 2024 01:52:43 +0100 Subject: [PATCH 5/7] Rename config value name --- redbot/cogs/mod/kickban.py | 18 +++++++++--------- redbot/cogs/mod/mod.py | 2 +- redbot/cogs/mod/settings.py | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/redbot/cogs/mod/kickban.py b/redbot/cogs/mod/kickban.py index 8044e5f83f3..0a0d1811653 100644 --- a/redbot/cogs/mod/kickban.py +++ b/redbot/cogs/mod/kickban.py @@ -117,7 +117,7 @@ async def ban_user( removed_temp = False - if reason is None and await self.config.guild(guild).mod_reason(): + if reason is None and await self.config.guild(guild).require_reason(): return False, _("You must provide a reason for the ban.") if not (0 <= days <= 7): @@ -306,7 +306,7 @@ async def kick(self, ctx: commands.Context, member: discord.Member, *, reason: s author = ctx.author guild = ctx.guild - if reason is None and await self.config.guild(guild).mod_reason(): + if reason is None and await self.config.guild(guild).require_reason(): await ctx.send(_("You must provide a reason for the kick.")) return @@ -435,7 +435,7 @@ async def massban( errors = {} upgrades = [] - if reason is None and await self.config.guild(ctx.guild).mod_reason(): + if reason is None and await self.config.guild(ctx.guild).require_reason(): await ctx.send(_("You must provide a reason for the massban.")) return @@ -616,7 +616,7 @@ async def tempban( guild = ctx.guild author = ctx.author - if reason is None and await self.config.guild(guild).mod_reason(): + if reason is None and await self.config.guild(guild).require_reason(): await ctx.send(_("You must provide a reason for the tempban.")) return @@ -699,7 +699,7 @@ async def softban(self, ctx: commands.Context, member: discord.Member, *, reason guild = ctx.guild author = ctx.author - if reason is None and await self.config.guild(guild).mod_reason(): + if reason is None and await self.config.guild(guild).require_reason(): await ctx.send(_("You must provide a reason for the softban.")) return @@ -790,7 +790,7 @@ async def voicekick( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Kick a member from a voice channel.""" - if reason is None and await self.config.guild(ctx.guild).mod_reason(): + if reason is None and await self.config.guild(ctx.guild).require_reason(): await ctx.send(_("You must provide a reason for the voicekick.")) return @@ -841,7 +841,7 @@ async def voiceunban( self, ctx: commands.Context, member: discord.Member, *, reason: str = None ): """Unban a user from speaking and listening in the server's voice channels.""" - if reason is None and await self.config.guild(ctx.guild).mod_reason(): + if reason is None and await self.config.guild(ctx.guild).require_reason(): await ctx.send(_("You must provide a reason for the voiceunban.")) return @@ -886,7 +886,7 @@ async def voiceunban( @commands.admin_or_permissions(mute_members=True, deafen_members=True) async def voiceban(self, ctx: commands.Context, member: discord.Member, *, reason: str = None): """Ban a user from speaking and listening in the server's voice channels.""" - if reason is None and await self.config.guild(ctx.guild).mod_reason(): + if reason is None and await self.config.guild(ctx.guild).require_reason(): await ctx.send(_("You must provide a reason for the voiceban.")) return @@ -939,7 +939,7 @@ async def unban( 1. Copy it from the mod log case (if one was created), or 2. Enable Developer Mode, go to Bans in this server's settings, right-click the user and select 'Copy ID'. """ - if reason is None and await self.config.guild(ctx.guild).mod_reason(): + if reason is None and await self.config.guild(ctx.guild).require_reason(): await ctx.send(_("You must provide a reason for the unban.")) return diff --git a/redbot/cogs/mod/mod.py b/redbot/cogs/mod/mod.py index 12bbbda6d95..17aeb0e7caa 100644 --- a/redbot/cogs/mod/mod.py +++ b/redbot/cogs/mod/mod.py @@ -57,7 +57,7 @@ class Mod( "reinvite_on_unban": False, "current_tempbans": [], "dm_on_kickban": False, - "mod_reason": False, + "require_reason": False, "default_days": 0, "default_tempban_duration": 60 * 60 * 24, "track_nicknames": True, diff --git a/redbot/cogs/mod/settings.py b/redbot/cogs/mod/settings.py index 19b60456587..cd5fc294143 100644 --- a/redbot/cogs/mod/settings.py +++ b/redbot/cogs/mod/settings.py @@ -380,14 +380,14 @@ async def requirereason(self, ctx: commands.Context, enabled: bool = None): """ guild = ctx.guild if enabled is None: - setting = await self.config.guild(guild).mod_reason() + setting = await self.config.guild(guild).require_reason() await ctx.send( _("Mod action reason requirement is currently set to: {setting}").format( setting=setting ) ) return - await self.config.guild(guild).mod_reason.set(enabled) + await self.config.guild(guild).require_reason.set(enabled) if enabled: await ctx.send(_("Bot will now require a reason for all mod actions.")) else: From 2b5ee62ce3a25693502658ddf8fc3aa50177c694 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Tue, 24 Dec 2024 01:53:21 +0100 Subject: [PATCH 6/7] Fix anchor name --- docs/cog_guides/mod.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cog_guides/mod.rst b/docs/cog_guides/mod.rst index 869ef3f5796..f412b1500d2 100644 --- a/docs/cog_guides/mod.rst +++ b/docs/cog_guides/mod.rst @@ -266,7 +266,7 @@ and reason as to why they were kicked/banned. * ``[enabled]``: Whether a message should be sent to a user when they are kicked/banned. |bool-input| -.. _mod-command-modset-reason: +.. _mod-command-modset-requirereason: """""""""""""""""""" modset requirereason From 21621d8fac024e873f1314d7c911233670abf7f7 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Tue, 24 Dec 2024 01:56:41 +0100 Subject: [PATCH 7/7] Split words --- redbot/cogs/mod/kickban.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/redbot/cogs/mod/kickban.py b/redbot/cogs/mod/kickban.py index 0a0d1811653..583acb2a8d1 100644 --- a/redbot/cogs/mod/kickban.py +++ b/redbot/cogs/mod/kickban.py @@ -617,7 +617,7 @@ async def tempban( author = ctx.author if reason is None and await self.config.guild(guild).require_reason(): - await ctx.send(_("You must provide a reason for the tempban.")) + await ctx.send(_("You must provide a reason for the temporary ban.")) return if author == member: @@ -791,7 +791,7 @@ async def voicekick( ): """Kick a member from a voice channel.""" if reason is None and await self.config.guild(ctx.guild).require_reason(): - await ctx.send(_("You must provide a reason for the voicekick.")) + await ctx.send(_("You must provide a reason for the voice kick.")) return author = ctx.author @@ -842,7 +842,7 @@ async def voiceunban( ): """Unban a user from speaking and listening in the server's voice channels.""" if reason is None and await self.config.guild(ctx.guild).require_reason(): - await ctx.send(_("You must provide a reason for the voiceunban.")) + await ctx.send(_("You must provide a reason for the voice unban.")) return user_voice_state = member.voice @@ -887,7 +887,7 @@ async def voiceunban( async def voiceban(self, ctx: commands.Context, member: discord.Member, *, reason: str = None): """Ban a user from speaking and listening in the server's voice channels.""" if reason is None and await self.config.guild(ctx.guild).require_reason(): - await ctx.send(_("You must provide a reason for the voiceban.")) + await ctx.send(_("You must provide a reason for the voice ban.")) return user_voice_state: discord.VoiceState = member.voice