From 40633e97449282bab6bb46ab50f3f2727bf26050 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Tue, 24 Apr 2018 18:04:47 -0500 Subject: [PATCH] Add description to spotify command --- cogs/spotify.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cogs/spotify.py b/cogs/spotify.py index 9095e64..34f4f7d 100644 --- a/cogs/spotify.py +++ b/cogs/spotify.py @@ -38,10 +38,15 @@ class Spotify: @utils.custom_perms(send_messages=True) @utils.check_restricted() async def spotify(self, ctx, *, query): - """Searches Spotify for a song, giving you the link you can use to listen in""" + """Searches Spotify for a song, giving you the link you can use to listen in. Give the query to search for + and it will search by title/artist for the best match + + EXAMPLE: !spotify Eminem + RESULT: Some Eminem song""" + # Setup the headers with the token that should be here headers = {"Authorization": "Bearer {}".format(self._token)} - opts = {"q": query, "type": "track,artist"} + opts = {"q": query, "type": "track"} url = "https://api.spotify.com/v1/search" response = await utils.request(url, headers=headers, payload=opts) try: @@ -54,6 +59,11 @@ class Spotify: @utils.custom_perms(send_messages=True) @utils.check_restricted() async def playlist(self, ctx, *, query): + """Searches Spotify for a playlist, giving you the link you can use to listen in. Give the query to search for + and it will search for the best match + + EXAMPLE: !spotify Eminem + RESULT: Some Eminem song""" # Setup the headers with the token that should be here headers = {"Authorization": "Bearer {}".format(self._token)} opts = {"q": query, "type": "playlist"}