瀏覽代碼

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

tags/v2.0.0
Roxie Gibson 6 年之前
父節點
當前提交
c5e48f4145
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      roxbot/cogs/reddit.py

+ 3
- 0
roxbot/cogs/reddit.py 查看文件

@@ -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…
取消
儲存