add mitch hedberg jokes

This commit is contained in:
Gordon Shumway 2019-11-11 02:05:29 -05:00 committed by GitHub
parent 56615aefa1
commit 163dfe4b87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -248,5 +248,16 @@ class Fun(callbacks.Plugin):
except:
self.log.exception("Error fetching URL")
catgif = wrap(catgif)
def mitch(self, irc, msg, args):
"""
Mitch (Hedberg) Jokes
"""
data = open("{0}/mitch_hedberg.txt".format(os.path.dirname(os.path.abspath(__file__))))
text = data.read()
reply = text.splitlines()
excuse = random.randrange(0, len(reply))
irc.reply(reply[excuse])
mitch = wrap(mitch)
Class = Fun