Check if a playlist is provided
This commit is contained in:
parent
86de528733
commit
0549f8134d
|
@ -79,6 +79,8 @@ class VoiceState:
|
||||||
error = str(e).partition(" ")[2]
|
error = str(e).partition(" ")[2]
|
||||||
await song.channel.send("Failed to download {}!\nError: {}".format(song.title, error))
|
await song.channel.send("Failed to download {}!\nError: {}".format(song.title, error))
|
||||||
continue
|
continue
|
||||||
|
except discord.Forbidden:
|
||||||
|
pass
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await song.channel.send("Failed to download {}!".format(song.title))
|
await song.channel.send("Failed to download {}!".format(song.title))
|
||||||
log.error(traceback.format_exc())
|
log.error(traceback.format_exc())
|
||||||
|
@ -350,13 +352,18 @@ class Music:
|
||||||
await ctx.send("You took too long!")
|
await ctx.send("You took too long!")
|
||||||
except LiveStreamError as e:
|
except LiveStreamError as e:
|
||||||
await ctx.send(str(e))
|
await ctx.send(str(e))
|
||||||
|
except WrongEntryTypeError:
|
||||||
|
await ctx.send("Cannot enqueue playlists at this time.")
|
||||||
else:
|
else:
|
||||||
if entry is None:
|
try:
|
||||||
await ctx.send("Sorry but I couldn't download/find {}".format(song))
|
if entry is None:
|
||||||
else:
|
await ctx.send("Sorry but I couldn't download/find {}".format(song))
|
||||||
embed = entry.to_embed()
|
else:
|
||||||
embed.title = "Enqueued song!"
|
embed = entry.to_embed()
|
||||||
await ctx.send(embed=embed)
|
embed.title = "Enqueued song!"
|
||||||
|
await ctx.send(embed=embed)
|
||||||
|
except discord.Forbidden:
|
||||||
|
pass
|
||||||
|
|
||||||
@commands.command(pass_context=True)
|
@commands.command(pass_context=True)
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
|
|
Loading…
Reference in a new issue