From 760aac506f65f3d4c6765f545ad6444bd086b859 Mon Sep 17 00:00:00 2001 From: Parker Date: Sun, 14 Apr 2024 20:31:05 -0500 Subject: Create/Implement `CheckPlayerError` error class --- code/cogs/slash_handlers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'code/cogs/slash_handlers.py') diff --git a/code/cogs/slash_handlers.py b/code/cogs/slash_handlers.py index 9f8f201..e36a5cc 100644 --- a/code/cogs/slash_handlers.py +++ b/code/cogs/slash_handlers.py @@ -4,7 +4,7 @@ from discord import app_commands from discord.ext.commands.errors import * import datetime -from global_variables import BOT_COLOR +from global_variables import BOT_COLOR, CheckPlayerError from custom_source import LoadError @@ -46,10 +46,10 @@ class slash_handlers(commands.Cog): # ) # await interaction.response.send_message(embed=embed, ephemeral=True) - elif isinstance(error, app_commands.AppCommandError): + elif isinstance(error, CheckPlayerError): embed = discord.Embed( - title=error.args[0]["title"], - description=error.args[0]["description"], + title=error.info["title"], + description=error.info["description"], color=BOT_COLOR, ) embed.set_footer( -- cgit v1.2.3-70-g09d2