Skip to content
Permalink
Browse files
just fixing the cat function so it doesn't appear twice
  • Loading branch information
lycette2 committed Nov 23, 2020
1 parent 1a2390b commit 5729b7c1d0dca96035e88691fd9f83bd9c199161
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
BIN +0 Bytes (100%) .vs/Chatbot/v16/.suo
Binary file not shown.
BIN +0 Bytes (100%) .vs/slnx.sqlite
Binary file not shown.
@@ -377,15 +377,16 @@ async def on_message(message): #checks for a message
#except:
#await message.channel.send(noSteamIDErrorReplies())

if "cat" in message.content.lower() or "kitten" in message.content.lower():
await message.channel.send(catMessage())
await message.channel.send(iNeedACat())

sadWords = ["sad", "upset", "unhappy", "depressed", "miserable", "despair", "dejected", "glum", "gloomy", "broken heart", "forlorn", "heartbroken", "melancholy", "woebegone", "cry",]
firstPersonWords = [" i ", "me", "we", "i am", "i'm", "my"]
if [entry for entry in sadWords if(entry in message.content.lower())] and ([entry for entry in firstPersonWords if(entry in message.content.lower())] or message.content.lower().startswith("i")):
await message.channel.send(cheerUpWithCats())
await message.channel.send(iNeedACat())
if "cat" in message.content.lower() or "kitten" in message.content.lower():

if [entry for entry in sadWords if(entry in message.content.lower())] and ([entry for entry in firstPersonWords if(entry in message.content.lower())] or message.content.lower().startswith("i")):
await message.channel.send(cheerUpWithCats())
await message.channel.send(iNeedACat())
else:
await message.channel.send(catMessage())
await message.channel.send(iNeedACat())

if "help" in message.content.lower() and "bot" in message.content.lower():
await message.channel.send(helpFunction())

0 comments on commit 5729b7c

Please sign in to comment.