✨ Added shuffle and hilo commands
This commit is contained in:
30
Gwendolyn.py
30
Gwendolyn.py
@ -474,7 +474,19 @@ async def parseCommands(message,content):
|
||||
response = blackjackSplit(str(message.channel),message.author.display_name)
|
||||
|
||||
await message.channel.send(response)
|
||||
|
||||
|
||||
# Returning current hi-lo value
|
||||
elif content.startswith("blackjack hilo") and message.author.display_name == "Nikolaj":
|
||||
with open("resources/games/hilo.txt", "r") as f:
|
||||
data = f.read()
|
||||
await message.channel.send(data)
|
||||
|
||||
# Shuffles the blackjack deck
|
||||
elif content.startswith("blackjack shuffle"):
|
||||
blackjackShuffle(blackjackDecks)
|
||||
logThis("Shuffling the blackjack deck...")
|
||||
await message.channel.send("Shuffling the deck...")
|
||||
|
||||
else:
|
||||
await message.channel.send("I didn't quite understand that")
|
||||
|
||||
@ -513,14 +525,14 @@ async def on_ready():
|
||||
# Reads messages and tests if they are Gwendolyn commands
|
||||
@client.event
|
||||
async def on_message(message):
|
||||
try:
|
||||
content = message.content
|
||||
if content.startswith(commandPrefix):
|
||||
logThis(message.author.display_name+" ran \""+content+"\"")
|
||||
await parseCommands(message,content.lower()[1:])
|
||||
except:
|
||||
logThis("Something fucked up (error code 000)")
|
||||
await message.channel.send("Something fucked up (error code 000)")
|
||||
#try:
|
||||
content = message.content
|
||||
if content.startswith(commandPrefix):
|
||||
logThis(message.author.display_name+" ran \""+content+"\"")
|
||||
await parseCommands(message,content.lower()[1:])
|
||||
#except:
|
||||
# logThis("Something fucked up (error code 000)")
|
||||
# await message.channel.send("Something fucked up (error code 000)")
|
||||
|
||||
# Is a bit sassy sometimes
|
||||
if ("gwendolyn" in message.content.lower() or message.content.startswith(commandPrefix)) and any(x in message.content.lower() for x in meanWords) and "ikke" not in message.content.lower() and "not" not in message.content.lower():
|
||||
|
Reference in New Issue
Block a user