commit
7db20d993d
10
trifling.py
10
trifling.py
|
@ -889,3 +889,13 @@ def weather(bot, trigger):
|
||||||
|
|
||||||
except:
|
except:
|
||||||
bot.say("The earth is on fire 🌎🔥")
|
bot.say("The earth is on fire 🌎🔥")
|
||||||
|
|
||||||
|
@sopel.module.commands('yeezy')
|
||||||
|
def yeezy(bot, trigger):
|
||||||
|
headers = {'User-Agent': 'monerobux-irc-bot-#wownero'}
|
||||||
|
resp = requests.get('https://api.kanye.rest', headers=headers, timeout=3)
|
||||||
|
resp.raise_for_status()
|
||||||
|
blob = resp.json()
|
||||||
|
if 'quote' not in blob or not isinstance(blob['quote'], str):
|
||||||
|
raise Exception('malformed response')
|
||||||
|
bot.say(blob['quote'])
|
||||||
|
|
Loading…
Reference in New Issue