diff options
author | Parker <contact@pkrm.dev> | 2024-04-14 20:31:05 -0500 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2024-04-14 20:31:05 -0500 |
commit | 760aac506f65f3d4c6765f545ad6444bd086b859 (patch) | |
tree | 3a4907ac0418bcf38d4cf7ed2f980834fbe95cd4 /code/cogs/slash_handlers.py | |
parent | 3c66d50822caf7959bb85a17e93aa03bc6c3639b (diff) |
Create/Implement `CheckPlayerError` error class
Diffstat (limited to 'code/cogs/slash_handlers.py')
-rw-r--r-- | code/cogs/slash_handlers.py | 8 |
1 files changed, 4 insertions, 4 deletions
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( |