We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5d74e48 commit d31c071Copy full SHA for d31c071
1 file changed
plugins/imgur.py
@@ -49,10 +49,12 @@ def get_items(text):
49
def load_api(bot):
50
global imgur_api
51
52
- client_id = bot.config.get("api_keys", {}).get("imgur_client_id")
53
- client_secret = bot.config.get("api_keys", {}).get("imgur_client_secret")
+ api_keys = bot.config.get("api_keys", {})
+ client_id = api_keys.get("imgur_client_id")
54
+ client_secret = api_keys.get("imgur_client_secret")
55
- if None in (client_id, client_secret):
56
+ if not (client_id and client_secret):
57
+ # Either the client id or secret aren't specified
58
imgur_api = None
59
return
60
else:
0 commit comments