update with bugfixes
This commit is contained in:
parent
8d3e7b6356
commit
83bc13a2c0
1 changed files with 13 additions and 13 deletions
|
@ -519,14 +519,14 @@ class Music(Cog):
|
|||
):
|
||||
logger.debug(f"add_to_queue({query}) called")
|
||||
# Check for permission to add tracks
|
||||
allowed = self.check_for_numbers(ctx)
|
||||
if not allowed:
|
||||
logger.info(f"{ctx.author} is not allowed to add to queue")
|
||||
#return await ctx.send(
|
||||
#"You must be in a voice chat by yourself "
|
||||
#"in order to use this command."
|
||||
#)
|
||||
return await ctx.send("No 💜")
|
||||
# allowed = self.check_for_numbers(ctx)
|
||||
# if not allowed:
|
||||
# logger.info(f"{ctx.author} is not allowed to add to queue")
|
||||
# #return await ctx.send(
|
||||
# #"You must be in a voice chat by yourself "
|
||||
# #"in order to use this command."
|
||||
# #)
|
||||
# return await ctx.send("No 💜")
|
||||
# Ensure we are connected to voice
|
||||
if not ctx.voice_client:
|
||||
logger.warning("no voice client")
|
||||
|
@ -664,7 +664,7 @@ class Music(Cog):
|
|||
source: Player = ctx.voice_client.source
|
||||
embed = discord.Embed(
|
||||
title=f"{self.track.title}",
|
||||
url=f"{self.track.source}",
|
||||
url=f"{self.track.source}" if self.track.source.startswith('http') else None,
|
||||
).add_field(
|
||||
name="Progress",
|
||||
value=f"{source.progress}",
|
||||
|
@ -673,10 +673,10 @@ class Music(Cog):
|
|||
icon_url=f"{self.track.requester.display_avatar.url}",
|
||||
)
|
||||
thumb = None
|
||||
if "thumbnail" in source.data:
|
||||
thumb = source.data['thumbnail']
|
||||
elif "thumbnails" in source.data:
|
||||
thumb = source.data['thumbnails'][0]['url']
|
||||
if self.track.data and "thumbnail" in self.track.data:
|
||||
thumb = self.track.data['thumbnail']
|
||||
elif self.track.data and "thumbnails" in self.track.data:
|
||||
thumb = self.track.data['thumbnails'][0]['url']
|
||||
if thumb:
|
||||
embed.set_thumbnail(
|
||||
url=thumb
|
||||
|
|
Loading…
Reference in a new issue