We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9896ef7 commit 6cd85feCopy full SHA for 6cd85fe
1 file changed
plugins/brew.py
@@ -5,11 +5,16 @@
5
api_url = "http://api.brewerydb.com/v2/search?format=json"
6
7
8
+@hook.on_start()
9
+def load_key(bot):
10
+ global api_key
11
+ api_key = bot.config.get("api_keys", {}).get("brewerydb", None)
12
+
13
14
@hook.command('brew')
15
def brew(text, bot):
16
"""<query> - returns the first brewerydb search result for <query>"""
17
- api_key = bot.config.get("api_keys", {}).get("brewerydb")
18
if not api_key:
19
return "No brewerydb API key set."
20
0 commit comments