This commit is contained in:
deathbybandaid 2022-05-06 13:19:38 -04:00
parent f72fd42743
commit 022472f414

View File

@ -12,11 +12,11 @@ def upper(bot, trigger, comrun):
joke = getDadJoke()
if not joke:
joke = 'My humor module is broken.'
comrun.say(str(joke))
comrun.say(joke)
def getDadJoke():
url = 'https://icanhazdadjoke.com'
page = requests.get(url, headers={'Accept': 'text/plain'})
joke = page.content
joke = page.text
return joke