Browse Source

added a check incase no imgur token is given. No errors for me.

tags/v2.0.0
Roxie Gibson 6 years ago
parent
commit
c5e48f4145
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      roxbot/cogs/reddit.py

+ 3
- 0
roxbot/cogs/reddit.py View File

@@ -46,6 +46,9 @@ async def imgur_get(url):
if await _imgur_removed(url):
return False

if not roxbot.imgur_token:
return False

base_endpoint = "https://api.imgur.com/3/"
endpoint_album = base_endpoint + "album/{}/images.json".format(url.split("/")[-1])
endpoint_image = base_endpoint + "image/{}.json".format(url.split("/")[-1])

Loading…
Cancel
Save