Skip to content

Commit

Permalink
Added volume to the preview embed
Browse files Browse the repository at this point in the history
  • Loading branch information
Fluxticks committed Jul 27, 2021
1 parent 6103f8a commit 4c7243a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/esportsbot/cogs/MusicCog.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ def get_updated_preview_message(self, guild_id):
current_song = self.active_guilds.get(guild_id).get("current_song")
updated_message = Embed(
title=f"Currently Playing: {current_song.get('title')}",
description=f"Current Volume: {int(self.active_guilds.get(guild_id).get('volume') * 100)}%",
colour=EmbedColours.music,
url=current_song.get("link"),
video=current_song.get("link")
Expand Down Expand Up @@ -1061,6 +1062,7 @@ async def __set_volume(self, guild_id, volume_level):

self.active_guilds.get(guild_id).get("voice_client").source.volume = float(volume_level) / float(100)
self.active_guilds.get(guild_id)["volume"] = float(volume_level) / float(100)
await self.update_messages(guild_id)

@command_group.command(name="shuffle", help="Shuffles the current queue.")
async def shuffle_queue(self, context: commands.Context):
Expand Down

0 comments on commit 4c7243a

Please sign in to comment.