From fbb51bb0e156aa3fbda288f2eadf3090153142d5 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 25 Sep 2021 21:34:46 +0200 Subject: [PATCH] Improve error messages --- src/bot.py | 4 ++-- src/message/__init__.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bot.py b/src/bot.py index 63a6e95..ac85f26 100644 --- a/src/bot.py +++ b/src/bot.py @@ -95,7 +95,7 @@ class Music(commands.Cog): async def skip(self, ctx): async with ctx.typing(): if ctx.voice_client is None or not ctx.voice_client.is_playing(): - raise commands.CommandError("Cannot skip: No song playing") + raise commands.CommandError("No song playing") ctx.voice_client.stop() @commands.command() @@ -108,7 +108,7 @@ class Music(commands.Cog): if ctx.author.voice: await ctx.author.voice.channel.connect() else: - raise commands.CommandError("Author not connected to a voice channel.") + raise commands.CommandError("Author not connected to a voice channel") if __name__ == "__main__": diff --git a/src/message/__init__.py b/src/message/__init__.py index 472127f..6998ef0 100644 --- a/src/message/__init__.py +++ b/src/message/__init__.py @@ -8,8 +8,7 @@ class BotMessage(discord.Embed): class ErrorMessage(BotMessage): def __init__(self, message): super().__init__( - title="Error", - description=message, + title=f"Error: {message}", color=discord.Color.red() )