Improve error messages
This commit is contained in:
parent
4bc1cdaae2
commit
fbb51bb0e1
|
@ -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__":
|
||||
|
|
|
@ -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()
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue