test
This commit is contained in:
parent
f72fd42743
commit
022472f414
@ -12,11 +12,11 @@ def upper(bot, trigger, comrun):
|
|||||||
joke = getDadJoke()
|
joke = getDadJoke()
|
||||||
if not joke:
|
if not joke:
|
||||||
joke = 'My humor module is broken.'
|
joke = 'My humor module is broken.'
|
||||||
comrun.say(str(joke))
|
comrun.say(joke)
|
||||||
|
|
||||||
|
|
||||||
def getDadJoke():
|
def getDadJoke():
|
||||||
url = 'https://icanhazdadjoke.com'
|
url = 'https://icanhazdadjoke.com'
|
||||||
page = requests.get(url, headers={'Accept': 'text/plain'})
|
page = requests.get(url, headers={'Accept': 'text/plain'})
|
||||||
joke = page.content
|
joke = page.text
|
||||||
return joke
|
return joke
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user