📝 Commenting and formatting
This commit is contained in:
@ -5,6 +5,8 @@ import random
|
||||
from . import money
|
||||
from funcs import logThis
|
||||
|
||||
# Starts a game of trivia. Downloads a question with answers, shuffles the wrong answers with the
|
||||
# correct answer and returns the questions and answers. Also saves the question in the games.json file.
|
||||
def triviaStart(channel : str):
|
||||
with open("resources/games/games.json", "r") as f:
|
||||
triviaFile = json.load(f)
|
||||
@ -44,7 +46,8 @@ def triviaStart(channel : str):
|
||||
logThis("There was already a trivia question for that channel")
|
||||
return "There's already a trivia question going on. Try again in like, a minute", "", ""
|
||||
|
||||
def triviaOtherThing(user : str, channel : str, command : str):
|
||||
# Lets players answer a trivia question
|
||||
def triviaAnswer(user : str, channel : str, command : str):
|
||||
with open("resources/games/games.json", "r") as f:
|
||||
data = json.load(f)
|
||||
|
||||
@ -66,6 +69,8 @@ def triviaOtherThing(user : str, channel : str, command : str):
|
||||
else:
|
||||
return "I didn't quite understand that"
|
||||
|
||||
|
||||
# Adds 1 GwendoBuck to each player that got the question right and deletes question from games.json.
|
||||
def triviaCountPoints(channel : str):
|
||||
with open("resources/games/games.json", "r") as f:
|
||||
data = json.load(f)
|
||||
|
Reference in New Issue
Block a user