Skip to content

Commit a1e8cff

Browse files
committed
add "I hardly know her" joke
1 parent 2067695 commit a1e8cff

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

protobot.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#####################################
2424
#
2525
COMMAND_PREFIX = '!' #
26-
VERSION = "v0.2-alpha" #
26+
VERSION = "v0.3-alpha" #
2727
ACTIVITY = discord.Game("!help") #
2828
LOG_LEVEL = logging.INFO #
2929
#
@@ -158,6 +158,19 @@ async def on_message(message):
158158
for recipient in mentions:
159159
await message.channel.send(f"Happy Birthday <@{recipient.id}>! 🎈🎉🎂")
160160

161+
elif 'er' in message.content.lower():
162+
"""
163+
Lets the bot tell the famous "x-er? I hardly know 'er!" joke
164+
"""
165+
166+
user_message = message.content.split()
167+
168+
for i in range(len(user_message)):
169+
if (user_message[i][-2:] == "er"):
170+
response = user_message[i][0].upper() + user_message[i][1:] + "? I hardly know her!"
171+
await message.channel.send(response)
172+
break
173+
161174
elif 'im' in message.content.lower() or 'i\'m' in message.content.lower() or 'i am' in message.content.lower():
162175
"""
163176
Lets the bot tell the famous "Hi x! I'm dad!" joke

0 commit comments

Comments
 (0)