Browse Source

fixed spelling mistake, broken option, added some awaits, and made the lack of thumbnail not break the np embed.

tags/v2.0.0
Roxie Gibson 5 years ago
parent
commit
1486e8f99c
2 changed files with 12 additions and 9 deletions
  1. +6
    -4
      CHANGELOG.md
  2. +6
    -5
      roxbot/cogs/voice.py

+ 6
- 4
CHANGELOG.md View File

@@ -8,11 +8,13 @@

### Regular Updates
#### New Features
- roxbot will remove all redundant settings (removed roles from self assign, etc.)
- cogs have a message if they fail to load. this is better than the entire program breaking.
- Roxbot will remove all redundant settings (removed roles from self assign, etc.)
- Cogs have a message if they fail to load. This is better than the entire program breaking.
#### Bug Fixes
- deepfry command now works all the time
- pride filter filenames fixed
- `deepfry` command now works all the time
- Pride filter filenames fixed
- As many spelling mistakes as possible
- If player can't find a thumbnail for the now playing embed, it will just not have one; Instead of breaking.

## v1.8.0
#### New Features

+ 6
- 5
roxbot/cogs/voice.py View File

@@ -81,7 +81,7 @@ ytdl_format_options = {

ffmpeg_options = {
'before_options': '-nostdin',
'options': '-vn -loglevel panic --force-ipv4'
'options': '-vn -loglevel panic'
}

ytdl = youtube_dl.YoutubeDL(ytdl_format_options)
@@ -191,7 +191,8 @@ class Voice:

embed = discord.Embed(title=title, colour=roxbot.EmbedColours.pink, url=np.webpage_url)
embed.description = "Uploaded by: [{0.uploader}]({0.uploader_url})\nURL: [Here]({0.webpage_url})\nDuration: {1}\nQueued by: {0.queued_by}".format(np, duration)
embed.set_image(url=np.thumbnail_url)
if np.thumbnail_url:
embed.set_image(url=np.thumbnail_url)
embed.set_footer(text="{}/{} | Volume: {}%".format(time_played, duration, int(self.now_playing[guild.id].volume*100)))
return embed

@@ -252,11 +253,11 @@ class Voice:

# Playlist and search handling.
if 'entries' in video and video.get("extractor_key") != "YoutubeSearch":
await ctx.send("Looks like you have given me a playlist. I will que up all {} videos in the playlist.".format(len(video.get("entries"))))
await ctx.send("Looks like you have given me a playlist. I will queue up all {} videos in the playlist.".format(len(video.get("entries"))))
data = dict(video)
video = data["entries"].pop(0)
for entry in data["entries"]:
self._queue_song(ctx, entry, stream)
await self._queue_song(ctx, entry, stream)
elif 'entries' in video and video.get("extractor_key") == "YoutubeSearch":
video = video["entries"][0]

@@ -285,7 +286,7 @@ class Voice:
await ctx.send(embed=embed)
else:
# Queue the song as there is already a song playing or paused.
self._queue_song(ctx, video, stream)
await self._queue_song(ctx, video, stream)

# Sleep because if not, queued up things will send first and probably freak out users or something
while self.am_queuing[guild.id] is True:

Loading…
Cancel
Save