1
0
Fork 0
mirror of synced 2024-05-18 19:42:28 +12:00

Don't make command server only

This commit is contained in:
phxntxm 2018-05-07 10:02:02 -05:00
parent 6145ab3df3
commit 9e39888589

View file

@ -34,7 +34,6 @@ class Spotify:
await asyncio.sleep(data.get("expires_in", 2400))
@commands.group(invoke_without_command=True)
@commands.guild_only()
@utils.custom_perms(send_messages=True)
@utils.check_restricted()
async def spotify(self, ctx, *, query):
@ -55,7 +54,6 @@ class Spotify:
await ctx.send("Couldn't find a song for:\n{}".format(query))
@spotify.command()
@commands.guild_only()
@utils.custom_perms(send_messages=True)
@utils.check_restricted()
async def playlist(self, ctx, *, query):
@ -71,7 +69,7 @@ class Spotify:
response = await utils.request(url, headers=headers, payload=opts)
try:
await ctx.send(response.get("playlists").get("items")[0].get("external_urls").get("spotify"))
except (KeyError, AttributeError):
except (KeyError, AttributeError, IndexError):
await ctx.send("Couldn't find a song for:\n{}".format(query))