first commit
This commit is contained in:
55
quotes.py
Normal file
55
quotes.py
Normal file
@@ -0,0 +1,55 @@
|
||||
import random
|
||||
import datetime
|
||||
|
||||
from students import STUDENT_IDS
|
||||
|
||||
QUOTES = {
|
||||
"NORMAL" : (
|
||||
"Oh boy, we are about to wake up!",
|
||||
"All right 👏 🫰",
|
||||
"How we doing, Paul?",
|
||||
"*Drops pen*",
|
||||
"How we doing, guys?",
|
||||
"Killing it!!!",
|
||||
"*Bounces ball off wall*",
|
||||
"Ugggghhh...",
|
||||
"Hmm... I see.",
|
||||
"What are we doing over here?",
|
||||
"Mmm... Okay! :clap:",
|
||||
"*Loudly* We don't like stupid prizes, now do we? Then, don't play stupid games!",
|
||||
"You guys are killing it!",
|
||||
"Do we need to go back over the module again?",
|
||||
"Let's get it done!",
|
||||
"Sorry, I can't hear over Devan and Connor talking.",
|
||||
"That's what I like to hear!"
|
||||
),
|
||||
"RARE" : (
|
||||
"Play stupid games, win big prizescat jacobs.sh! 🤑🤑",
|
||||
"Oooooo raahahah!",
|
||||
"It's cherry-pickin' time, y'all!",
|
||||
"What does the fox say?"
|
||||
),
|
||||
"MYTHIC" : (
|
||||
"I'm proud of you.",
|
||||
"You can take a 5-minute break."
|
||||
)
|
||||
}
|
||||
|
||||
def select_quote():
|
||||
rarity = random.randint(0, 99)
|
||||
if rarity < 1:
|
||||
quote = random.choice(QUOTES.get("MYTHIC"))
|
||||
elif rarity < 15:
|
||||
quote = random.choice(QUOTES.get("RARE"))
|
||||
else:
|
||||
quote = random.choice(QUOTES.get("NORMAL"))
|
||||
# Append log to a file (quotes.log)
|
||||
with open("./logs/quotes.log", "at+") as log_file:
|
||||
log_file.write(f"At {datetime.datetime.now()}, rarity was rolled as {rarity} and selected: {quote}\n")
|
||||
return quote
|
||||
|
||||
def select_student():
|
||||
student = random.choice(STUDENT_IDS)
|
||||
with open("./logs/quotes.log", "at+") as log_file:
|
||||
log_file.write(f"At {datetime.datetime.now()}, wanted to see {student} after class.\n")
|
||||
return student
|
||||
Reference in New Issue
Block a user