Sfoglia il codice sorgente

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

tags/v2.0.0
Roxie Gibson 6 anni fa
parent
commit
c5e48f4145
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. +3
    -0
      roxbot/cogs/reddit.py

+ 3
- 0
roxbot/cogs/reddit.py Vedi 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…
Annulla
Salva