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



### Regular Updates ### Regular Updates
#### New Features #### 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 #### 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 ## v1.8.0
#### New Features #### New Features

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



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


ytdl = youtube_dl.YoutubeDL(ytdl_format_options) ytdl = youtube_dl.YoutubeDL(ytdl_format_options)


embed = discord.Embed(title=title, colour=roxbot.EmbedColours.pink, url=np.webpage_url) 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.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))) embed.set_footer(text="{}/{} | Volume: {}%".format(time_played, duration, int(self.now_playing[guild.id].volume*100)))
return embed return embed




# Playlist and search handling. # Playlist and search handling.
if 'entries' in video and video.get("extractor_key") != "YoutubeSearch": 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) data = dict(video)
video = data["entries"].pop(0) video = data["entries"].pop(0)
for entry in data["entries"]: 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": elif 'entries' in video and video.get("extractor_key") == "YoutubeSearch":
video = video["entries"][0] video = video["entries"][0]


await ctx.send(embed=embed) await ctx.send(embed=embed)
else: else:
# Queue the song as there is already a song playing or paused. # 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 # 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: while self.am_queuing[guild.id] is True:

Loading…
Cancel
Save