Improve error messages

This commit is contained in:
ekzyis 2021-09-25 21:34:46 +02:00
parent 4bc1cdaae2
commit fbb51bb0e1
2 changed files with 3 additions and 4 deletions

View File

@ -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__":

View File

@ -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()
)