From f26da6bf80a3dfcfedd2ee99243250426746bbfa Mon Sep 17 00:00:00 2001 From: neoarz Date: Sat, 4 Oct 2025 22:09:11 -0400 Subject: [PATCH] fix(hackban): was looking for str instead of int rip Enhanced the feedback command's error response to use an embed for better user experience. Changed the 'user_id' parameter type from int to str in hackban commands to support non-integer user IDs. --- cogs/general/feedback.py | 8 +++++++- cogs/moderation/__init__.py | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cogs/general/feedback.py b/cogs/general/feedback.py index 7970086..f3f0f84 100644 --- a/cogs/general/feedback.py +++ b/cogs/general/feedback.py @@ -47,6 +47,12 @@ def feedback_command(): ).set_author(name="Feedback System", icon_url="https://yes.nighty.works/raw/gSxqzV.png") ) else: - await context.send("This command can only be used as a slash command. Please use `/general feedback` instead.") + embed = discord.Embed( + title="Error!", + description="This command can only be used as a slash command. Please use `/general feedback` instead.", + color=0xE02B2B, + ) + embed.set_author(name="Feedback System", icon_url="https://yes.nighty.works/raw/gSxqzV.png") + await context.send(embed=embed) return feedback \ No newline at end of file diff --git a/cogs/moderation/__init__.py b/cogs/moderation/__init__.py index 56b43a2..50ee84c 100644 --- a/cogs/moderation/__init__.py +++ b/cogs/moderation/__init__.py @@ -63,7 +63,7 @@ class Moderation(commands.GroupCog, name="moderation"): await self._invoke_hybrid(context, "archive", limit=limit) @moderation_group.command(name="hackban") - async def moderation_group_hackban(self, context: Context, user_id: int, *, reason: str = "Not specified"): + async def moderation_group_hackban(self, context: Context, user_id: str, *, reason: str = "Not specified"): await self._invoke_hybrid(context, "hackban", user_id=user_id, reason=reason) @moderation_group.command(name="nick") @@ -115,7 +115,7 @@ class Moderation(commands.GroupCog, name="moderation"): name="hackban", description="Bans a user without the user having to be in the server." ) - async def hackban(self, context, user_id: int, *, reason: str = "Not specified"): + async def hackban(self, context, user_id: str, *, reason: str = "Not specified"): return await hackban_command()(self, context, user_id=user_id, reason=reason) @commands.check(_require_group_prefix)