💰 Added money-based commands

This commit is contained in:
Nikolaj Danger
2020-07-27 18:19:14 +02:00
parent 95d5fa685a
commit b971c0d522
6 changed files with 85 additions and 14 deletions

View File

@ -268,7 +268,7 @@ async def on_message(message):
elif message.content.lower().startswith("!trivia "):
command = message.content.lower().replace("!trivia ","")
response = funcs.triviaOtherThing(message.author.name,str(message.channel),command)
response = funcs.triviaOtherThing(message.author.name.lower(),str(message.channel),command)
if response.startswith("Locked in "):
await message.add_reaction("👍")
else:
@ -277,6 +277,29 @@ async def on_message(message):
funcs.logThis("I didn't understand that")
await message.channel.send("I didn't understand that")
#Checks your point balance
elif message.content.lower().startswith("!balance"):
funcs.logThis(message.author.name+" ran \""+message.content+"\"")
response = funcs.checkBalance(message.author.name.lower())
await message.channel.send(message.author.name + " has " + str(response) + " points")
#gives money to other player
elif message.content.lower().startswith("!give "):
funcs.logThis(message.author.name+" ran \""+message.content+"\"")
commands = message.content.lower().split(" ")
if len(commands) >= 3:
try:
amount = int(commands[2])
response = funcs.giveMoney(message.author.name.lower(),commands[1],amount)
await message.channel.send(response)
except:
funcs.logThis("I didn't quite understand that")
await message.channel.send("I didn't quite understand that")
else:
funcs.logThis("I didn't understand that")
await message.channel.send("I didn't understand that")
# Is a bit sassy sometimes
meanWords = ["stupid", "bitch", "fuck", "dumb", "idiot"]