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!", "*Paces*", "*Sprints to the ringing phone*", "*Spins lanyard*", "Come on guys, you should know this already!", "Let me just say this...", "Not trying to be mean or anything...but..." ), "RARE" : ( "Play stupid games, win big prizes! 🤑🤑", "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.", "I have somewhere to be at 9:30, so you guys will have a sub." ), "LEGENDARY": ( ) } def select_quote() -> str: 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() -> int: 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