Skip to content

Commit 214e7e0

Browse files
committed
pep8 cleanup of jokes.py
1 parent 2fc5a19 commit 214e7e0

1 file changed

Lines changed: 61 additions & 15 deletions

File tree

plugins/jokes.py

Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from cloudbot import hook
77

8+
89
@hook.on_start()
910
def load_jokes(bot):
1011
"""
@@ -36,49 +37,56 @@ def load_jokes(bot):
3637
with codecs.open(os.path.join(bot.data_dir, "lawyerjoke.txt"), encoding="utf-8") as f:
3738
lawyerjoke = [line.strip() for line in f.readlines() if not line.startswith("//")]
3839

40+
3941
@hook.command()
40-
def yomomma(text, message, conn):
42+
def yomomma(text):
4143
"""input <nick>, tells a yo momma joke to <nick>"""
4244
target = text.strip()
4345
return '{}, {}'.format(target, random.choice(yo_momma).lower())
4446

47+
4548
@hook.command(autohelp=False)
46-
def doit(message, conn):
49+
def doit(message):
4750
"""prints a do it line, example: mathmaticians do with a pencil"""
4851
message(random.choice(do_it))
4952

5053

5154
@hook.command(autohelp=False)
52-
def pun(message, conn):
55+
def pun(message):
5356
"""Come on everyone loves puns right?"""
5457
message(random.choice(pun))
5558

59+
5660
@hook.command(autohelp=False)
57-
def confucious(message, conn):
61+
def confucious(message):
5862
"""confucious say man standing on toilet is high on pot."""
5963
message('Confucious say {}'.format(random.choice(confucious).lower()))
6064

65+
6166
@hook.command(autohelp=False)
62-
def dadjoke(message, conn):
67+
def dadjoke(message):
6368
"""love em or hate em, bring on the dad jokes."""
6469
message(random.choice(one_liner))
6570

71+
6672
@hook.command(autohelp=False)
67-
def wisdom(message, conn):
73+
def wisdom(message):
6874
"""words of wisdom from various bathroom stalls."""
6975
message(random.choice(wisdom))
7076

77+
7178
@hook.command(autohelp=False)
72-
def bookpun(message, conn):
79+
def bookpun(message):
7380
"""Suggests a pun of a book title/author."""
74-
#suggestions = ["Why not try", "You should read", "You gotta check out"]
81+
# suggestions = ["Why not try", "You should read", "You gotta check out"]
7582
book = random.choice(book_puns)
7683
title = book.split(':')[0].strip()
7784
author = book.split(':')[1].strip()
7885
message("{} by {}".format(title, author))
7986

87+
8088
@hook.command("boobs", "boobies")
81-
def boobies(text, conn):
89+
def boobies(text):
8290
"""prints boobies!"""
8391
boob = "\u2299"
8492
out = text.strip()
@@ -87,37 +95,75 @@ def boobies(text, conn):
8795
return "Sorry I couldn't turn anything in '{}' into boobs for you.".format(out)
8896
return out
8997

98+
9099
@hook.command("awesome", "iscool", "cool")
91-
def awesome(text, message):
100+
def awesome(text):
92101
"""Prints a webpage to show <nick> how awesome they are."""
93102
nick_re = re.compile("^[A-Za-z0-9_|.\-\]\[]*$", re.I)
94103
link = 'http://is-awesome.cool/{}'
95104
nick = text.split(' ')[0]
96105
if nick_re.match(nick):
97-
return "{}: I am blown away by your recent awesome action(s). Please read \x02{}\x02".format(nick, link.format(nick))
106+
return "{}: I am blown away by your recent awesome action(s). Please read \x02{}\x02".format(
107+
nick, link.format(nick)
108+
)
98109
else:
99110
return "Sorry I can't tell {} how awesome they are.".format(nick)
100111

112+
101113
@hook.command(autohelp=False)
102114
def triforce(message):
103115
"""returns a triforce!"""
104-
top = ["\u00a0\u25b2","\u00a0\u00a0\u25b2", "\u25b2", "\u00a0\u25b2"]
116+
top = ["\u00a0\u25b2", "\u00a0\u00a0\u25b2", "\u25b2", "\u00a0\u25b2"]
105117
bottom = ["\u25b2\u00a0\u25b2", "\u25b2 \u25b2", "\u25b2\u25b2"]
106118
message(random.choice(top))
107119
message(random.choice(bottom))
108120

121+
109122
@hook.command("kero", "kerowhack")
110-
def kero(text, message):
123+
def kero(text):
111124
"""Returns the text input the way kerouac5 would say it."""
112-
saying = ["PRIUS JIMMY BUFFET!!!", "DISNEY APPLE BEARDS, FUCK COFFEE!", "FUCK THINGS THAT ARE GOOD AND NICE!", "RED ZONE SCHMED ZONE!", "i DONT USE APPLE CPMPUTERS!!!!", "???!??!? YOU CLEARLY DONT LISTEN!", "WHY ARE PEOPLE CALLING ME A NERD I WAS ON THE iPHONE AND DONT GET IT!!!!", "OH MAN FUCK BEARDS!", "I AM GOING DOWN THE HALL TO A MEETING UNDER MY OWN POWER RIGHT NOW!!!", "NOT A VEGETABLE!!!!!!!", "i think thats a vulva euphemism, PW.", "THEY START SHOVING CAKES IN EACH OTHERS FACES LIKE ITS A MANATEE WEDDING HOLY SHIT!", "I DONT MAKE THE NEWS I JUST REPORT IT!", "HURR DURR YOU ARE OLD WITH PRINTED PAGES", "pants on head mouthbreather.", "HELLO I AM BACK WHAT IS NEW?", "YOU ARE A HORRIBLE DEAD FAN!", "i try not to be racist, but seriously. there's a mexican guy in our neighborhood. on the 4th like 40 people in his family came over and shot off fireworks and they sat in lawn chairs in the front yard.", "there's an old asian woman in our neighborhood who hides in her house and walks 10 feet behind her husband and is a bad driver.", "HOW AM I NOT SUPPOSED TO BE RACIST WITH THAT OVERWHELMING EVIDENCE EXACTLY!?!?", "???? WTF IS", "NO I NEVER THINK THAT I AM VERY HAPPY", "HORSES CANT TALK IDIOTS", "I WENT TO ZERO STRIP CLUBS AND HAD ZERO STREET BEER", "I FUCKING WRITE CURRICULUM ON HOW TO SELL AND NETWORK AND RUN A BUSINESS ALL FUCKING DAY LONG", "you gentlemen are hilarious. theres certainly nothing in what you're doing that could be considered \"ball busting\" or \"trolling.\"", "YOU CAN EMAIL FROM YOUR PHONE? MAGIC MAN FROM THE FUTURE, DO THEY HAVE RUBBER VAGINAS MEN CAN PUT THEIR DICKS INTO AS WELL?", "really who the fuck cares who the third president was?", "why dont you just bore your candidat to tears with talk about subarus and guns and talk about the recruiters that have been calling *you*? Itll be just like irc.", "DONT TAKE AWAY MY FUN.", "I may beat off on the notes afterward because that turns me on, DONT JUDGE ME ITS NORMAL.", "wtf is a homeless guyy gonna do with a speaker SURE WOULD LIKE TO EAT BUT AT LEAST I HAVE MY KOOL JAMZ", "thanks for overexplaining that one", "Really. I say ejaculating on pictures is weird and somehow that translates to OMG WAT A PRUDE", "Had someone ejaculate on a picture of me. Gotta try it once.", "apparently theres a thing where people ejaculate on pictures i bet you could monetize that.", "'Hey you can talk to this chick and maybe get laid or cum on a picture,' only complete social retards pick the latter.", "Hahaha those weirdos with tentacle porn excuse me I need to whack it on a picture and put it on the Internet.", "enjoy your penis salad sandwich", "im pretty sure ive never said 'OH MY GOODNESS LOOK AT HIS PENIS I WISH I HAD THAT PENIS' then went searching for it to show someone else 24 hours later because i couldn't stop thinking about teddy bridgewater's beautiful penis <3", "i don't think \"we\" have ever \"talked a lot of dick.\"", "OMG DID YOU SEE THE BALLS TOO?", "be as weird as you want. i dont understand why its so cool now to go \"OOOO THATS JUST WHO HE IS DONT JUDGE.\" if you like to have your balls hit with a hammer while you ejaculate onto pictures of horses i think you should be called fucking weird."]
125+
saying = [
126+
"PRIUS JIMMY BUFFET!!!", "DISNEY APPLE BEARDS, FUCK COFFEE!", "FUCK THINGS THAT ARE GOOD AND NICE!",
127+
"RED ZONE SCHMED ZONE!", "i DONT USE APPLE CPMPUTERS!!!!", "???!??!? YOU CLEARLY DONT LISTEN!",
128+
"WHY ARE PEOPLE CALLING ME A NERD I WAS ON THE iPHONE AND DONT GET IT!!!!", "OH MAN FUCK BEARDS!",
129+
"I AM GOING DOWN THE HALL TO A MEETING UNDER MY OWN POWER RIGHT NOW!!!", "NOT A VEGETABLE!!!!!!!",
130+
"i think thats a vulva euphemism, PW.",
131+
"THEY START SHOVING CAKES IN EACH OTHERS FACES LIKE ITS A MANATEE WEDDING HOLY SHIT!",
132+
"I DONT MAKE THE NEWS I JUST REPORT IT!", "HURR DURR YOU ARE OLD WITH PRINTED PAGES",
133+
"pants on head mouthbreather.", "HELLO I AM BACK WHAT IS NEW?", "YOU ARE A HORRIBLE DEAD FAN!",
134+
"i try not to be racist, but seriously. there's a mexican guy in our neighborhood. on the 4th like 40 people in his family came over and shot off fireworks and they sat in lawn chairs in the front yard.",
135+
"there's an old asian woman in our neighborhood who hides in her house and walks 10 feet behind her husband and is a bad driver.",
136+
"HOW AM I NOT SUPPOSED TO BE RACIST WITH THAT OVERWHELMING EVIDENCE EXACTLY!?!?", "???? WTF IS",
137+
"NO I NEVER THINK THAT I AM VERY HAPPY", "HORSES CANT TALK IDIOTS",
138+
"I WENT TO ZERO STRIP CLUBS AND HAD ZERO STREET BEER",
139+
"I FUCKING WRITE CURRICULUM ON HOW TO SELL AND NETWORK AND RUN A BUSINESS ALL FUCKING DAY LONG",
140+
"you gentlemen are hilarious. theres certainly nothing in what you're doing that could be considered \"ball busting\" or \"trolling.\"",
141+
"YOU CAN EMAIL FROM YOUR PHONE? MAGIC MAN FROM THE FUTURE, DO THEY HAVE RUBBER VAGINAS MEN CAN PUT THEIR DICKS INTO AS WELL?",
142+
"really who the fuck cares who the third president was?",
143+
"why dont you just bore your candidat to tears with talk about subarus and guns and talk about the recruiters that have been calling *you*? Itll be just like irc.",
144+
"DONT TAKE AWAY MY FUN.",
145+
"I may beat off on the notes afterward because that turns me on, DONT JUDGE ME ITS NORMAL.",
146+
"wtf is a homeless guyy gonna do with a speaker SURE WOULD LIKE TO EAT BUT AT LEAST I HAVE MY KOOL JAMZ",
147+
"thanks for overexplaining that one",
148+
"Really. I say ejaculating on pictures is weird and somehow that translates to OMG WAT A PRUDE",
149+
"Had someone ejaculate on a picture of me. Gotta try it once.",
150+
"apparently theres a thing where people ejaculate on pictures i bet you could monetize that.",
151+
"'Hey you can talk to this chick and maybe get laid or cum on a picture,' only complete social retards pick the latter.",
152+
"Hahaha those weirdos with tentacle porn excuse me I need to whack it on a picture and put it on the Internet.",
153+
"enjoy your penis salad sandwich",
154+
"im pretty sure ive never said 'OH MY GOODNESS LOOK AT HIS PENIS I WISH I HAD THAT PENIS' then went searching for it to show someone else 24 hours later because i couldn't stop thinking about teddy bridgewater's beautiful penis <3",
155+
"i don't think \"we\" have ever \"talked a lot of dick.\"", "OMG DID YOU SEE THE BALLS TOO?",
156+
"be as weird as you want. i dont understand why its so cool now to go \"OOOO THATS JUST WHO HE IS DONT JUDGE.\" if you like to have your balls hit with a hammer while you ejaculate onto pictures of horses i think you should be called fucking weird."
157+
]
113158
keror = random.choice(saying).upper()
114159
if keror == "???? WTF IS":
115160
out = keror + " " + text.upper()
116161
else:
117162
out = text.upper() + " " + keror
118163
return out
119164

165+
120166
@hook.command(autohelp=False)
121-
def lawyerjoke(message, conn):
167+
def lawyerjoke(message):
122168
"""returns a lawyer joke, so lawyers know how much we hate them"""
123169
message(random.choice(lawyerjoke))

0 commit comments

Comments
 (0)