Change entry to print an embed instead of a message
This commit is contained in:
parent
1e451942be
commit
8f9e514260
|
@ -68,7 +68,9 @@ class VoiceState:
|
|||
|
||||
try:
|
||||
self.current = await self.songs.get_next_entry()
|
||||
await song.channel.send("Now playing {}".format(self.current))
|
||||
embed = self.current.to_embed()
|
||||
embed.title = "Now playing!"
|
||||
await song.channel.send(embed=embed)
|
||||
except ExtractionError as e:
|
||||
await song.channel.send("Failed to download {}!\nError: {}".format(self.current.title, e))
|
||||
continue
|
||||
|
@ -333,7 +335,9 @@ class Music:
|
|||
if entry is None:
|
||||
await ctx.send("Sorry but I couldn't download/find {}".format(song))
|
||||
else:
|
||||
await ctx.send("Enqueued {}".format(entry))
|
||||
embed = entry.to_embed()
|
||||
embed.title = "Enqueued song!"
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
@commands.command(pass_context=True)
|
||||
@commands.guild_only()
|
||||
|
|
|
@ -285,6 +285,8 @@ class URLPlaylistEntry(BasePlaylistEntry):
|
|||
# Fill in the simple things
|
||||
embed.add_field(name='Title', value=self.title, inline=False)
|
||||
embed.add_field(name='Requester', value=self.requester.display_name, inline=False)
|
||||
if self.thumbnail:
|
||||
embed.set_thumbnail(url=self.thumbnail)
|
||||
# Get the current length of the song and display this
|
||||
length = divmod(round(self.length, 0), 60)
|
||||
fmt = "{0[0]}m {0[1]}s".format(length)
|
||||
|
|
Loading…
Reference in a new issue