mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
Minor adjustments
This commit is contained in:
parent
bb4e8aa376
commit
0443a95c99
@ -248,10 +248,14 @@ class Audio:
|
|||||||
self.queue.append(link)
|
self.queue.append(link)
|
||||||
msg = ctx.message
|
msg = ctx.message
|
||||||
result = await self.get_song_metadata(link)
|
result = await self.get_song_metadata(link)
|
||||||
if result["title"] != []:
|
try: # In case of invalid SOUNDCLOUD ID
|
||||||
await self.bot.say("{} has been put into the queue by {}.".format(result["title"], msg.author))
|
if result["title"] != []:
|
||||||
else:
|
await self.bot.say("{} has been put into the queue by {}.".format(result["title"], msg.author))
|
||||||
await self.bot.say("The song has been put into the queue by {}, however it may error.".format(msg.author))
|
else:
|
||||||
|
await self.bot.say("The song has been put into the queue by {}, however it may error.".format(msg.author))
|
||||||
|
except:
|
||||||
|
await self.bot.say("A song has been put into the queue by {}.".format(msg.author))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
await self.bot.say("I'm already playing a playlist.")
|
await self.bot.say("I'm already playing a playlist.")
|
||||||
|
|
||||||
@ -405,7 +409,7 @@ class Audio:
|
|||||||
|
|
||||||
@audioset.command()
|
@audioset.command()
|
||||||
@checks.is_owner()
|
@checks.is_owner()
|
||||||
async def soundcloud(self, ID : str):
|
async def soundcloud(self, ID : str=None):
|
||||||
"""Sets the SoundCloud Client ID
|
"""Sets the SoundCloud Client ID
|
||||||
"""
|
"""
|
||||||
self.settings["SOUNDCLOUD_CLIENT_ID"] = ID
|
self.settings["SOUNDCLOUD_CLIENT_ID"] = ID
|
||||||
@ -678,7 +682,7 @@ class Audio:
|
|||||||
url = "http://api.soundcloud.com/resolve.json?url={0}&client_id={1}".format(song_url, self.settings["SOUNDCLOUD_CLIENT_ID"])
|
url = "http://api.soundcloud.com/resolve.json?url={0}&client_id={1}".format(song_url, self.settings["SOUNDCLOUD_CLIENT_ID"])
|
||||||
result = await self.get_json(url)
|
result = await self.get_json(url)
|
||||||
else:
|
else:
|
||||||
result = {"title": "Couldn't get title"}
|
result = {"title": "A song "}
|
||||||
return result
|
return result
|
||||||
|
|
||||||
class EmptyPlayer(): #dummy player
|
class EmptyPlayer(): #dummy player
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user