Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import random
- import asyncio
- import os
- from discord.ext import commands
- # Define the intents your bot will use
- intents = discord.Intents.default()
- intents.messages = True # Enable receiving message events
- intents.guilds = True # Enable receiving guild events
- intents.members = True # Enable receiving member events
- intents.message_content = True
- # Initialize the Discord client with intents
- bot = commands.Bot(command_prefix="!", intents=intents)
- # Define puzzles for each category
- ANIMALS_PUZZLES = [
- "Speedy Cheetah races across the African savannah",
- "Majestic Elephant trumpets loudly in the wilderness",
- "Graceful Giraffe stretches to reach high tree leaves",
- "Fierce Lion roars proudly on the African plains",
- "Majestic Eagle soars high above the rugged mountains",
- "Playful Dolphin leaps joyfully in the ocean waves",
- "Nocturnal Owl watches silently from the treetops",
- "Stealthy Panther prowls through the dense jungle",
- "Mighty Rhino charges through the African grasslands",
- "Curious Meerkat stands alert on the desert sands",
- "Sleek Leopard stalks its prey through the jungle",
- "Elegant Swan glides gracefully on the tranquil lake",
- "Gentle Deer grazes peacefully in the forest glade",
- "Agile Monkey swings effortlessly through the trees",
- "Regal Lioness leads her pride across the savannah",
- "Fearless Wolf howls under the silver moonlight",
- "Clever Fox darts through the underbrush in search of food",
- "Majestic Horse gallops freely in the open fields",
- "Adorable Bunny hops joyfully through the meadow",
- "Mysterious Black Panther lurks in the shadows",
- "Beautiful Peacock flaunts its vibrant feathers",
- "Swift Hummingbird flits from flower to flower",
- "Mighty Gorilla pounds its chest in the dense jungle",
- "Colorful Parrot squawks loudly in the tropical forest",
- "Steadfast Ox plows the fields with unwavering determination",
- "Sly Raccoon scavenges for food in the moonlight",
- "Enigmatic Chameleon blends seamlessly into its surroundings",
- "Noble Stag stands regally on the forest edge",
- "Swift Falcon dives swiftly from the sky in pursuit of prey",
- "Gentle Lamb frolics in the green pastures",
- ]
- FOOD_DRINK_PUZZLES = [
- "Golden brown Croissant with a delicate buttery aroma",
- "Sizzling Fajitas with onions and peppers on a skillet",
- "Tantalizing Tiramisu layered with creamy mascarpone",
- "Spicy Pad Thai garnished with crushed peanuts and lime",
- "Buttery Lobster Tail served with drawn garlic butter",
- "Exotic Dragon Fruit with vibrant pink flesh and black seeds",
- "Crunchy Tempura Shrimp dipped in a tangy soy sauce",
- "Hearty Beef Stew simmered with root vegetables and herbs",
- "Refreshing Mojito with muddled mint and lime wedges",
- "Creamy Risotto infused with saffron and Parmesan cheese",
- "Fluffy Belgian Waffle topped with fresh berries and whipped cream",
- "Smoky BBQ Ribs glazed with tangy barbecue sauce",
- "Decadent Chocolate Fondue with assorted fruits and marshmallows",
- "Savory Gourmet Burger topped with melted cheese and crispy bacon",
- "Zesty Margherita Pizza with fresh tomatoes and basil leaves",
- "Velvety Pumpkin Soup garnished with roasted pumpkin seeds",
- "Fizzy Prosecco Champagne served in elegant crystal flutes",
- "Rich Chocolate Lava Cake oozing with molten chocolate center",
- "Crispy Calamari Rings served with spicy marinara dipping sauce",
- "Tangy Kimchi made from fermented cabbage and chili peppers",
- "Creamy Lobster Bisque garnished with fresh chives",
- "Aromatic Jasmine Rice steamed to fluffy perfection",
- "Juicy Watermelon slices chilled and refreshing on a hot day",
- "Tender Beef Wellington wrapped in flaky puff pastry",
- "Silky Chocolate Mousse topped with whipped cream and chocolate shavings",
- "Fragrant Earl Grey Tea served with a slice of lemon",
- "Succulent Roast Duck with crispy skin and tender meat",
- "Sweet and Sour Pineapple Chicken served over steamed rice",
- "Crunchy Kale Chips seasoned with sea salt and nutritional yeast",
- "Sizzling Beef Bulgogi marinated in a spicy sweet sauce",
- ]
- QUOTES_PUZZLES = [
- "The journey of a thousand miles begins with a single step",
- "In the midst of chaos, there is also opportunity",
- "To live is the rarest thing in the world",
- "The only way to do great work is to love what you do",
- "Dream big and dare to fail",
- "Life is what happens when you're busy making other plans",
- "Success is not final, failure is not fatal",
- "The greatest glory in living lies not in never falling",
- "Believe you can and you're halfway there",
- "The future belongs to those who believe in the beauty",
- "Life is either a daring adventure or nothing at all",
- "Nothing in life is to be feared, it is only to be understood",
- "The only limit to our realization of tomorrow",
- "It is our choices that show what we truly are",
- "Every child is an artist. The problem is how to remain",
- "The only thing worse than being blind is having sight",
- "Do not go where the path may lead",
- "The only true wisdom is in knowing you know nothing",
- "A journey of a thousand miles begins with a single step",
- "The best way to predict the future is to invent it",
- "The secret of getting ahead is getting started",
- "You must be the change you wish to see in the world",
- "The future belongs to those who believe in the beauty",
- "Life is what happens when you're busy making other plans",
- "Strive not to be a success, but rather to be of value",
- "Change your thoughts and you change your world",
- "The only thing necessary for the triumph of evil",
- "The only way to do great work is to love what you do",
- "The best preparation for tomorrow is doing your best today",
- ]
- MOVIES_PUZZLES = [
- "Inception A mind bending journey into the depths of dreams",
- "The Shawshank Redemption A tale of hope and redemption",
- "The Matrix A groundbreaking sci-fi adventure with mind bending twists",
- "Fight Club An edgy exploration of identity and consumerism",
- "The Dark Knight A gripping tale of chaos and morality",
- "Pulp Fiction A nonlinear narrative with unforgettable characters",
- "Forrest Gump A heartwarming story of love, loss, and destiny",
- "The Silence of the Lambs A chilling psychological thriller",
- "The Lord of the Rings An epic fantasy saga of friendship and heroism",
- "The Godfather A timeless tale of power, family, and betrayal",
- "The Shawshank Redemption A story of hope and resilience",
- "Schindler's List A poignant portrayal of humanity amid tragedy",
- "Star Wars A space opera that captured the imaginations of millions",
- "Casablanca A classic romance set against the backdrop of World War II",
- "The Lion King An animated masterpiece with timeless themes",
- "Titanic A tragic love story set aboard the ill-fated RMS Titanic",
- "The Wizard of Oz A whimsical journey through a magical land",
- "Goodfellas A gritty crime drama based on true events",
- "The Godfather A saga of power, loyalty, and betrayal",
- "Back to the Future A thrilling adventure through time",
- "The Matrix A mind bending journey into a simulated reality",
- "The Dark Knight A dark and complex exploration of heroism",
- "Fight Club A provocative examination of modern masculinity",
- "Inception A cerebral heist thriller set within the architecture of the mind",
- "The Shawshank Redemption A powerful tale of friendship and redemption",
- "Pulp Fiction A non-linear narrative weaving multiple storylines",
- "Forrest Gump A heartwarming journey through American history",
- "The Silence of the Lambs A gripping psychological thriller",
- "The Lord of the Rings An epic fantasy adventure of good versus evil",
- "Star Wars A timeless space opera that defined a generation",
- ]
- PLACES_PUZZLES = [
- "Eiffel Tower An iconic landmark of Paris",
- "Statue of Liberty A symbol of freedom and democracy",
- "Great Wall of China An ancient marvel visible from space",
- "Machu Picchu A mystical Incan city perched high in the Andes Mountains",
- "Taj Mahal A magnificent marble mausoleum in Agra",
- "Pyramids of Giza Ancient wonders shrouded in mystery",
- "Grand Canyon A breathtaking natural wonder carved by the Colorado River",
- "Colosseum An iconic symbol of ancient Rome",
- "Sydney Opera House An architectural marvel on Sydney Harbour",
- "Mount Everest The tallest peak on Earth",
- "Niagara Falls A majestic natural wonder on the US-Canada border",
- "Bora Bora A tropical paradise with crystal-clear waters",
- "Angkor Wat A stunning temple complex in Cambodia",
- "Petra A historic city carved into rose-colored rock",
- "Acropolis An ancient citadel overlooking Athens",
- "Stonehenge A prehistoric monument in Wiltshire",
- "Times Square A bustling commercial and entertainment hub",
- "Big Ben An iconic clock tower in London",
- "Kremlin A historic fortress in the heart of Moscow",
- "Hollywood Walk of Fame A sidewalk tribute to entertainment icons",
- "Neuschwanstein Castle A fairytale castle nestled in the Bavarian Alps",
- "Mount Fuji An iconic volcanic peak in Japan",
- "Forbidden City A vast imperial palace complex in Beijing",
- "Easter Island Moai Enigmatic stone statues on a remote island",
- "Sistine Chapel Home to Michelangelo's masterpiece",
- "Burj Khalifa The tallest building in the world",
- "Mount Rushmore A monumental sculpture carved into granite",
- "Christ the Redeemer A towering monument in Rio de Janeiro",
- "Alhambra A stunning Moorish palace in Granada",
- "Golden Gate Bridge An iconic symbol of San Francisco",
- ]
- FICTIONAL_CHARACTERS_PUZZLES = [
- "Hannibal Lecter A brilliant yet twisted psychiatrist and serial killer",
- "Sherlock Holmes A master detective with keen powers of observation",
- "Atticus Finch A principled lawyer defending justice in the South",
- "Darth Vader A dark lord of the Sith with a tragic past",
- "Katniss Everdeen A courageous rebel fighting against tyranny",
- "Lara Croft A fearless archaeologist exploring ancient ruins",
- "Dorothy Gale A plucky girl on a fantastical journey through Oz",
- "Captain Jack Sparrow A witty and eccentric pirate captain",
- "Hermione Granger A brilliant witch and loyal friend",
- "Frodo Baggins A humble hobbit tasked with saving Middle-earth",
- "Indiana Jones An adventurous archaeologist and treasure hunter",
- "Lisbeth Salander A fierce and enigmatic hacker seeking justice",
- "James Bond A suave and sophisticated MI6 agent",
- "Wolverine A fierce mutant with retractable claws and rapid healing",
- "Princess Leia A fearless leader of the Rebel Alliance",
- "Don Quixote An idealistic knight-errant on a quest for chivalry",
- "Winnie the Pooh A lovable bear with a penchant for honey",
- "The Joker A chaotic and unpredictable criminal mastermind",
- "Wonder Woman A powerful Amazonian warrior fighting for justice",
- "Peter Pan A mischievous boy who refuses to grow up",
- "Captain Ahab A obsessed captain on a quest for vengeance",
- "Spartacus A slave who leads a revolt against the Roman Empire",
- "Tarzan A jungle-dwelling hero raised by apes",
- "Mulan A courageous warrior who disguises herself as a man",
- "Luke Skywalker A farm boy who becomes a Jedi Knight",
- "The Wicked Witch of the West A malevolent sorceress from Oz",
- "Dracula A charismatic vampire with a thirst for blood",
- "Bilbo Baggins A reluctant hero on a journey to reclaim treasure",
- "Hercules A demi-god with superhuman strength",
- "Puss in Boots A charming and cunning feline adventurer",
- ]
- WHAT_ARE_YOU_DOING_PUZZLES = [
- "Exploring the depths of a mysterious ancient ruin",
- "Embarking on a perilous journey across uncharted seas",
- "Deciphering the cryptic clues of a hidden treasure map",
- "Venturing into the heart of a dense and enchanted forest",
- "Unraveling the dark secrets of a haunted mansion",
- "Surviving in a post-apocalyptic wasteland overrun by mutants",
- "Navigating the treacherous waters of a pirate-infested sea",
- "Fighting alongside valiant knights in a medieval battlefield",
- "Confronting the ultimate evil in a battle for the fate of the world",
- "Embarking on a quest to save a kidnapped princess from a dragon",
- "Traversing the vast expanse of a desert kingdom on camelback",
- "Solving the riddles of an enigmatic sphinx in the desert sands",
- "Outwitting a cunning and ruthless bandit king in a high-stakes heist",
- "Exploring the mystical realms of the fae in search of hidden treasures",
- "Engaging in a deadly game of cat-and-mouse with a notorious assassin",
- "Surviving the harsh conditions of an unforgiving arctic wilderness",
- "Fulfilling an ancient prophecy to bring balance to the world",
- "Discovering the lost civilization of an ancient and forgotten people",
- "Rescuing a group of hostages from a terrorist stronghold",
- "Escaping from a maximum-security prison with cunning and stealth",
- "Sailing the high seas in search of fame, fortune, and adventure",
- "Defeating a horde of rampaging monsters threatening a peaceful village",
- "Challenging a powerful sorcerer to a magical duel of wits and wills",
- "Exploring the dark and twisted corridors of a cursed castle",
- "Surviving a zombie apocalypse with quick thinking and resourcefulness",
- "Embarking on an epic quest to recover a stolen artifact of immense power",
- "Confronting the ghostly inhabitants of a haunted mansion",
- "Braving the dangers of a dense and forbidding jungle",
- "Racing against time to stop an impending cataclysmic event",
- "Battling against hordes of demons to save the world from eternal darkness",
- ]
- WHAT_ARE_YOU_WEARING_PUZZLES = [
- "A suit of shining armor adorned with intricate engravings",
- "A flowing robe woven from the finest silk and embroidered with gold thread",
- "A cloak of invisibility that renders its wearer unseen to all but the keenest eyes",
- "A pendant imbued with ancient magic that grants its wearer protection from harm",
- "A crown of shimmering diamonds that glitters in the light of the full moon",
- "A pair of enchanted boots that allow their wearer to walk on water",
- "A mask of cunning disguise that conceals its wearer's true identity",
- "A cloak of shadows that renders its wearer invisible to mortal eyes",
- "A pair of wings fashioned from feathers of purest white that grant their wearer the gift of flight",
- "A circlet of starlight that bestows upon its wearer visions of the future",
- "A robe of flowing lava that grants its wearer mastery over fire",
- "A helm of shining steel that protects its wearer from all harm",
- "A pair of gauntlets forged from the heart of a fallen star that grant their wearer the strength of a titan",
- "A cloak of whispers that grants its wearer the power of persuasion",
- "A mask of many faces that grants its wearer the ability to change their appearance at will",
- "A pair of sandals that grant their wearer the speed of Hermes",
- "A crown of flames that grants its wearer the power of pyrokinesis",
- "A helm of shadows that grants its wearer the power to command the darkness",
- "A cloak of shimmering moonlight that grants its wearer the power of illusion",
- "A pair of gloves that grant their wearer mastery over the elements",
- "A belt of stars that grants its wearer the power to control the heavens",
- ]
- SONG_TITLES_PUZZLES = [
- "Tears Dry on Their Own",
- "Killing Me Softly with His Song",
- "Dancing Queen in the Moonlight",
- "A Whiter Shade of Pale",
- "The Sound of Silence",
- "You're the One That I Want",
- "The Thrill Is Gone Away",
- "I Can't Help Falling in Love",
- "You Can't Always Get What You Want",
- "With or Without You",
- "Come As You Are",
- "Bridge Over Troubled Water",
- "Wish You Were Here with Me",
- "Don't Let the Sun Go Down on Me",
- "I Heard It Through the Grapevine",
- "A Horse with No Name",
- "When You Were Young and Free",
- "Girls Just Want to Have Fun",
- "Dream a Little Dream of Me",
- "What's Love Got to Do with It"
- ]
- RIDDLES_AND_RHYMES_PUZZLES = [
- "Measure of Time, Yet Subjective in Length",
- "Once in a Minute, Yet Fleeting as Thought",
- "Head and Tail, Yet Mobility Without Limbs",
- "Take and Leave, Yet Always Equally Balanced",
- "Keys to Gates, Yet Doors Remain Shut",
- "Neck Without Head, Yet Graceful in Form",
- "Made and Sold, Yet Never Truly Owned",
- "Broken Before Use, Yet Intact in Concept",
- "Wet and Dry, Yet Both in Simultaneous State",
- "Speech Without Words, Yet Communicative in Nature",
- "Sightless Gaze, Yet Perceptive in Insight",
- "Many Keys, Yet None Fit the Lock",
- "Yours to Hold, Yet Others to Employ",
- "Endless Journey, Yet Stationary in Space",
- "Face and Hands, Yet Bodyless and Free",
- "Head and Tail, Yet Earthy in Hue",
- "Grows in Absence, Yet Shrinks in Presence",
- "Balanced Step, Yet Straddled Between Realms",
- "Descends Forever, Yet Never Soars",
- "Cracked, Made, Told, Played, Yet Eternal Cycle",
- "Civilization's Map, Yet Nature's Dominion",
- "Catches Dreams, Yet Lets Realities Slip",
- "Expands Limitlessly, Yet Occupies No Volume",
- "Letter of Start and Finish, Yet Infinite in Between",
- "Grip of Right, Yet Released by the Left",
- "Shattered by Force, Yet Never Felled by Gravity",
- "Sees All, Yet Remains Blind to Truth",
- "Speaks of Hunger, Yet Nourishes Not",
- "Quantified for Preparation, Yet Unmeasured in Impact",
- ]
- PUZZLES = {
- "Animals": ANIMALS_PUZZLES,
- "Food and Drink": FOOD_DRINK_PUZZLES,
- "Quotations": QUOTES_PUZZLES,
- "Movie Quotes": MOVIES_PUZZLES,
- "Places": PLACES_PUZZLES,
- "Fictional Characters": FICTIONAL_CHARACTERS_PUZZLES,
- "What Are You Doing": WHAT_ARE_YOU_DOING_PUZZLES,
- "What Are You Wearing": WHAT_ARE_YOU_WEARING_PUZZLES,
- "Song Titles": SONG_TITLES_PUZZLES,
- "Riddles and Rhymes": RIDDLES_AND_RHYMES_PUZZLES,
- }
- # Define possible outcomes for spinning the wheel
- WHEEL_OUTCOMES = [
- "Robbed",
- "Spin Lost",
- "Spin Again",
- "100",
- "200",
- "300",
- "400",
- "500",
- "600",
- "700",
- "800",
- "900",
- "1000",
- "1500"
- ]
- SUPER_WHEEL_OUTCOMES = [
- "1000",
- "1500",
- "2500"
- ]
- ULTRA_WHEEL_OUTCOMES = [
- "2000",
- "3000",
- "4000"
- ]
- MEGA_WHEEL_OUTCOMES = [
- "2500",
- "4000",
- "5000"
- ]
- # Define a dictionary of commands and their descriptions
- commands_dict = {
- '!ssw': 'Start a new game',
- '!join': 'Join the game.',
- '!joint': 'Special command for joey',
- '!spin': 'Spin the wheel.',
- '!guess [letter]': 'Guess a letter in the puzzle.',
- '!solve [puzzle]': 'Attempt to solve the puzzle.',
- '!superspin': 'Spin the wheel with extra chance of winning (requires win count between 10 and 24).',
- '!ultraspin': 'Spin the wheel with extra chance of winning (requires win count between 25 and 49).',
- '!megaspin': 'Spin the wheel with extra chance of winning (requires win count of 50 or more).',
- '!commands': 'Display the list of available commands.'
- }
- special_players = {
- "480539285607546910": "WELCOME QUEEN LIZZY! YOU ARE AMAZING!\nhttps://tenor.com/view/lizard-elmo-liz-hi-liz-hi-lizzy-elmo-lizzy-gif-26781052",
- "1222299615538450465": "SUPREMEEE VICTORYYY!\nhttps://tenor.com/view/sabrewulf-video-games-gaming-xbox-killer-instinct-gif-3538282248554946598",
- "1197590901741076601": "Welcome the coup queen!\nhttps://tenor.com/view/hi-kira-e-chill-gif-24196509",
- "725242689498513458": "Soft kitty...Warm Kitty... I AM ANGRY KITTY... WOMP WOMP\nhttps://tenor.com/view/annoyed-disappointed-mad-upset-gif-26051038",
- "1063542949314560092": "JOEY HAS ARRIVED PUFF PUFF PASS!\nhttps://tenor.com/view/sister-joe-dirt-david-spade-hands-up-gif-16731619"
- }
- # Global variables
- game_created = False
- game_started = False # Flag to track if the game has started
- players = {}
- current_player = None
- current_puzzle = ""
- current_category = None # Define current_category globally
- revealed_letters = []
- scoreboard = {}
- guessed_correctly = False
- outcome = None # Define outcome here to avoid reference error
- solve_attempted = False # Flag to track if a solve attempt was made
- game_initiator = None # Store the user who initiated the game
- guessed_letters = [] # GUESSED LETTERS
- win_counts = {} # Initialize win counts dictionary
- # Initialize players dictionary with win counts
- def initialize_players():
- global players
- win_counts = read_win_counts()
- # Initialize players with win counts
- for player_id in win_counts.keys():
- players[player_id] = {'win_count': win_counts[player_id], 'spun': False, 'superspun': False, 'ultraspun': False,
- 'megaspun': False}
- # Function to reset game state
- def reset_game():
- global game_created, game_started, players, current_player, current_puzzle, revealed_letters, scoreboard, \
- guessed_correctly, outcome, solve_attempted, game_initiator
- game_created = False
- game_started = False
- players.clear()
- current_player = None
- current_puzzle = ""
- revealed_letters = []
- scoreboard = {}
- guessed_correctly = False
- outcome = None
- solve_attempted = False
- game_initiator = None
- global guessed_letters
- guessed_letters = []
- current_category = None
- # Event: Bot is ready
- @bot.event
- async def on_ready():
- print(f'Logged in as {bot.user}')
- # Function to load win counts from file
- def load_win_counts():
- win_counts = {}
- with open('wincount.txt', 'r') as file:
- for line in file:
- user_id, count = line.strip().split(':')
- win_counts[user_id] = int(count)
- return win_counts
- # Function to initialize players dictionary with win counts from the file
- def initialize_players():
- players = {}
- win_counts = load_win_counts()
- for user_id in win_counts:
- players[user_id] = {'win_count': win_counts[user_id], 'spun': False,
- 'superspun': False} # Include 'spun' and 'superspun'
- return players
- # Event: Message received
- @bot.event
- async def on_message(message):
- global game_created, game_started, current_player, current_puzzle, revealed_letters, scoreboard, \
- guessed_correctly, outcome, solve_attempted, game_initiator, players
- if message.author == bot.user:
- return
- if message.content == '!ssw':
- # Create a new game if one isn't already in progress
- if not game_created:
- reset_game()
- game_initiator = message.author # Store the user who initiated the game
- game_created = True
- await message.channel.send('Saberwulfs Spin Wheel! Type !join to join the game! and !start to start')
- await message.channel.send("Copyright Disclaimer:\n"
- "This Wheel of Fortune game is inspired by the original "
- "\"Wheel of Fortune\" television show created by Merv Griffin. "
- "All rights for the original concept, format, and trademarks belong "
- "to their respective owners. This game is created purely for entertainment "
- "purposes and is not affiliated with, endorsed by, or sponsored by the creators "
- "of the original \"Wheel of Fortune\" show.")
- # Add the user who typed !ssw to the game
- if message.author not in players:
- players[message.author] = {'spun': False, 'superspun': False, 'ultraspun': False,
- 'megaspun': False} # Initialize spun status for the player
- await message.channel.send(f'{message.author.mention} joined the game!')
- # Check if the user is special and send the corresponding message
- if str(message.author.id) in special_players:
- await message.channel.send(special_players[str(message.author.id)])
- # Allow players to join regardless of whether a game is created or not
- # Allow players to join regardless of whether a game is created or not
- # Allow players to join regardless of whether a game is created or not
- if message.content == '!join':
- # Add the player to the game if it's created and not started
- if game_created and not game_started:
- if message.author not in players:
- # Initialize spun and superspun status for the player
- players[message.author] = {'spun': False, 'superspun': False, 'ultraspun': False, 'megaspun': False}
- await message.channel.send(f'{message.author.mention} joined the game!')
- # Send a message after the command is entered
- await message.channel.send("Thank you for joining the game!")
- # Send a list of players who have joined the game
- if players:
- player_list = '\n'.join([p.mention for p in players.keys()])
- await message.channel.send(f'Players in the game: {player_list}')
- # Special messages for specific users
- if str(message.author.id) == "480539285607546910": # Lizzy's ID
- await message.channel.send("WELCOME QUEEN LIZZY! YOU ARE AMAZING!")
- await message.channel.send(
- "https://tenor.com/view/lizard-elmo-liz-hi-liz-hi-lizzy-elmo-lizzy-gif-26781052")
- elif str(message.author.id) == "1222299615538450465": # SABERS's ID
- await message.channel.send("SUPREME VICTORYYY!")
- await message.channel.send(
- "https://tenor.com/view/sabrewulf-video-games-gaming-xbox-killer-instinct-gif-3538282248554946598")
- elif str(message.author.id) == "1197590901741076601": # Kira's ID
- await message.channel.send("Welcome the coup queen!")
- await message.channel.send("https://tenor.com/view/hi-kira-e-chill-gif-24196509")
- elif str(message.author.id) == "725242689498513458": # Rere's ID
- await message.channel.send("Soft kitty...Warm Kitty... I AM ANGRY KITTY... WOMP WOMP")
- await message.channel.send("https://tenor.com/view/annoyed-disappointed-mad-upset-gif-26051038")
- else:
- await message.channel.send('You have already joined the game.')
- elif game_started:
- await message.channel.send('Sorry, the game has already started. You cannot join now.')
- else:
- await message.channel.send('There is no game currently. Please create a game using !ssw.')
- elif message.content == '!commands':
- command_list = '\n'.join([f'{command}: {description}' for command, description in commands_dict.items()])
- await message.channel.send(f'Available Commands:\n{command_list}')
- elif message.content == '!joint':
- # Check if the author of the message is the allowed user
- if str(message.author.id) == "1063542949314560092": # Replace this ID with the desired user's ID
- # Add the player to the game if it's created and not started
- if game_created and not game_started:
- if message.author not in players:
- # Initialize spun and superspun status for the player
- players[message.author] = {'spun': False, 'superspun': False, 'ultraspun': False, 'megaspun': False}
- await message.channel.send(f'{message.author.mention} joined the game!')
- # Send a message after the command is entered
- await message.channel.send("Thank you for joining the game!")
- await message.channel.send("JOEY HAS ARRIVED PUFF PUFF PASS!")
- await message.channel.send(
- "https://tenor.com/view/sister-joe-dirt-david-spade-hands-up-gif-16731619") # Additional message for !joint
- # Send a list of players who have joined the game
- if players:
- player_list = '\n'.join([p.mention for p in players.keys()])
- await message.channel.send(f'Players in the game: {player_list}')
- elif game_started:
- await message.channel.send('Sorry, the game has already started. You cannot join now.')
- else:
- await message.channel.send('There is no game currently. Please create a game using !ssw.')
- else:
- await message.channel.send("You are not authorized to use this command.")
- elif message.content == '!start':
- global current_category # Ensure current_category is declared as global here
- # Start the game if the person who created the game types the command
- if message.author == game_initiator and not current_player:
- # Check if enough players have joined
- if len(players) >= 1:
- game_started = True # Mark the game as started
- await message.channel.send('Game started! Waiting for spins...')
- # Prompt the player to select a category
- await message.channel.send('Please pick a category for the puzzles:\n'
- 'Categories:\n'
- '1. Riddles and Rhymes\n'
- '2. Food and Drink\n'
- '3. Places\n'
- '4. Fictional Characters\n'
- '5. Movie Quotes\n'
- '6. Quotations\n'
- '7. What Are You Doing\n'
- '8. What Are You Wearing\n'
- '9. Song Titles\n'
- '10. Animals')
- # Store the selected category
- selected_category = None
- category_names = {
- 1: "Riddles and Rhymes",
- 2: "Food and Drink",
- 3: "Places",
- 4: "Fictional Characters",
- 5: "Movie Quotes",
- 6: "Quotations",
- 7: "What Are You Doing",
- 8: "What Are You Wearing",
- 9: "Song Titles",
- 10: "Animals"
- }
- puzzles = None
- def check_category(m):
- return m.author == message.author and m.content.isdigit() and 1 <= int(m.content) <= 10
- try:
- category_message = await bot.wait_for('message', check=check_category, timeout=30)
- selected_category = int(category_message.content)
- except asyncio.TimeoutError:
- await message.channel.send('You took too long to select a category. Game ended.')
- reset_game()
- return
- # Define puzzles for each category
- if selected_category == 1:
- puzzles = RIDDLES_AND_RHYMES_PUZZLES
- elif selected_category == 2:
- puzzles = FOOD_DRINK_PUZZLES
- elif selected_category == 3:
- puzzles = PLACES_PUZZLES
- elif selected_category == 4:
- puzzles = FICTIONAL_CHARACTERS_PUZZLES
- elif selected_category == 5:
- puzzles = MOVIES_PUZZLES
- elif selected_category == 6:
- puzzles = QUOTES_PUZZLES
- elif selected_category == 7:
- puzzles = WHAT_ARE_YOU_DOING_PUZZLES
- elif selected_category == 8:
- puzzles = WHAT_ARE_YOU_WEARING_PUZZLES
- elif selected_category == 9:
- puzzles = SONG_TITLES_PUZZLES
- elif selected_category == 10:
- puzzles = ANIMALS_PUZZLES
- current_puzzle = random.choice(puzzles)
- # Check if the current puzzle contains a category name
- if ":" in current_puzzle:
- category, puzzle_text = current_puzzle.split(":", 1)
- else:
- # If the puzzle text contains colons, consider the entire puzzle text as the puzzle and choose a default category name
- category = category_names[selected_category]
- puzzle_text = current_puzzle
- revealed_letters = ['-' if char.isalpha() else char for char in puzzle_text]
- # Display the puzzle with "-" for unrevealed letters and guessed letters underneath
- puzzle_display = ' '.join(revealed_letters)
- # Save the current category
- current_category = category_names[selected_category]
- await message.channel.send(f'Category: {current_category}\nPuzzle: {puzzle_display}')
- # Initialize scoreboard
- for player in players.keys():
- scoreboard[player] = 0
- # Select a random player to start
- current_player = random.choice(list(players.keys()))
- if current_player is not None:
- await message.channel.send(f"It's {current_player.mention}'s turn to spin! Use !spin")
- else:
- await message.channel.send('There are not enough players to start the game.')
- else:
- await message.channel.send('You are not authorized to start the game.')
- elif message.content == '!category':
- if current_category:
- await message.channel.send(f"The current category is: {current_category}")
- else:
- await message.channel.send("No category has been selected yet.")
- # Inside your existing !spin command handler
- elif message.content == '!spin':
- # Spin Sabers wheel
- if message.author == current_player and not players[current_player]['spun']:
- outcome = random.choice(WHEEL_OUTCOMES)
- if current_player is not None:
- await message.channel.send(f'{current_player.mention} spun the wheel and got: {outcome}')
- # Display the puzzle with correctly guessed letters
- puzzle_display = ' '.join(revealed_letters)
- await message.channel.send(f'Current Puzzle: {puzzle_display}')
- await message.channel.send(f"The current category is: {current_category}")
- guessed_letters_display = ', '.join(guessed_letters)
- await message.channel.send(f'Letters Already Guessed: {guessed_letters_display}')
- players[current_player]['spun'] = True
- # If outcome allows, prompt the player to guess a letter
- # Handle the outcome of the spin
- if outcome.isdigit():
- await message.channel.send('Guess a letter using !guess or !solve to Solve.')
- guessed_correctly = False
- elif outcome == "Spin Again":
- await message.channel.send('You got Spin Again! Please !spin again...')
- await message.channel.send(
- 'https://tenor.com/view/zach-galifianakis-angry-intense-mad-rage-gif-20192527')
- # Reset the spin status for the player
- players[current_player]['spun'] = False
- # Remind the player to spin again
- if current_player is not None:
- await message.channel.send(f'{current_player.mention}, it\'s your turn to spin again! use !spin')
- elif outcome == "Robbed":
- await message.channel.send('You spun "Robbed"! You lose all your points. WOMP WOMP!')
- await message.channel.send('https://tenor.com/view/spongebob-money-in-the-bag-gif-21484249')
- scoreboard[current_player] = 0 # Reset player's score to 0
- await message.channel.send('Your score has been reset to 0.')
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- else:
- await message.channel.send('You Lose your turn! It\'s now the next player\'s turn.')
- await message.channel.send('https://tenor.com/view/hehe-not-hehe-no-angry-cat-angry-gif-23436666')
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- # Start a timer for 90 seconds for the player to guess or solve
- try:
- msg = await bot.wait_for('message', timeout=30,
- check=lambda m: m.author == current_player
- and not guessed_correctly
- and (m.content.startswith('!solve') or m.content.startswith(
- '!guess')
- or m.content.startswith('!spin')))
- if msg.content == '!solve' or msg.content == '!guess':
- # Proceed with guessing or solving
- # Your existing logic here
- pass
- else:
- # Ignore the message and allow the player to continue their turn
- pass
- except asyncio.TimeoutError:
- await message.channel.send("You took too long to guess or solve. It's now the next player's turn.")
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f"It's {current_player.mention}'s turn to spin! use !spin")
- elif message.author == current_player and players[current_player]['spun']:
- # Check if the player needs to guess or solve
- if not guessed_correctly:
- await message.channel.send('Please guess a letter using !guess or solve the puzzle using !solve.')
- else:
- await (message.channel.send
- ('Please wait for your next turn.'))
- else:
- await message.channel.send('It is not your turn to spin')
- elif message.content == '!superspin':
- # Read win counts from the file
- win_counts = {}
- with open('wincount.txt', 'r') as file:
- for line in file:
- # Split the line based on whitespace
- parts = line.strip().split()
- if len(parts) >= 2: # Ensure there are at least two parts
- user_id = parts[0]
- count = int(parts[1])
- win_counts[user_id] = count
- else:
- print(f"Ignoring invalid line in wincount.txt: {line.strip()}")
- if current_player is not None:
- # Check if the author is the current player, the command hasn't been used yet in this game,
- # and the win count is between 10 and 24
- if message.author == current_player and not players[current_player]['spun'] and not players[current_player][
- 'superspun']:
- # Check if the player has the required win count
- author_id = str(message.author.id)
- if author_id in win_counts and 10 <= win_counts[author_id] <= 24: # Adjust range as needed
- outcome = random.choice(SUPER_WHEEL_OUTCOMES)
- if message.author:
- await message.channel.send(f'{message.author.mention} spun the wheel and got: {outcome}')
- # Display the puzzle with correctly guessed letters
- puzzle_display = ' '.join(revealed_letters)
- await message.channel.send(f'Current Puzzle: {puzzle_display}')
- await message.channel.send(f"The current category is: {current_category}")
- guessed_letters_display = ', '.join(guessed_letters)
- await message.channel.send(f'Letters Already Guessed: {guessed_letters_display}')
- else:
- await message.channel.send("Sorry, I couldn't determine who spun the wheel.")
- players[current_player]['superspun'] = True # Mark that the command has been used in this game
- players[current_player]['spun'] = True # Mark that the player has spun
- # Handle other logic based on outcome
- if outcome.isdigit():
- await message.channel.send('Guess a letter using !guess or !solve to Solve.')
- guessed_correctly = False
- update_win_count(current_player) # Update win count
- else:
- # Inform the player that they don't have the proper win count
- await message.channel.send(
- "Sorry, you need to have a win count between 10 and 24 to use !superspin.")
- elif message.author == current_player and players[current_player]['spun']:
- # Check if the player needs to guess or solve
- if not guessed_correctly:
- await message.channel.send('Please guess a letter using !guess or solve the puzzle using !solve.')
- else:
- await message.channel.send('Please wait for your next turn.')
- elif message.author == current_player and players[current_player]['superspun']:
- # Inform the player that they have already used the !superspin command in this game
- await message.channel.send("Sorry, you can only use the !superspin command once per game.")
- else:
- await message.channel.send('You already super spun')
- else:
- await message.channel.send('An error occurred: Current player is None.')
- elif message.content == '!ultraspin':
- # Read win counts from the file
- win_counts = {}
- with open('wincount.txt', 'r') as file:
- for line in file:
- # Split the line based on whitespace
- parts = line.strip().split()
- if len(parts) >= 2: # Ensure there are at least two parts
- user_id = parts[0]
- count = int(parts[1])
- win_counts[user_id] = count
- else:
- print(f"Ignoring invalid line in wincount.txt: {line.strip()}")
- if current_player is None:
- await message.channel.send("Sorry, there's no current player.")
- return
- if message.author == current_player and not players[current_player]['spun'] and not players[current_player][
- 'ultraspun']:
- # Check if the author's win count is within the required range
- author_id = str(message.author.id)
- if author_id in win_counts and 25 <= win_counts[author_id] <= 49: # Adjust range as needed
- outcome = random.choice(ULTRA_WHEEL_OUTCOMES)
- if message.author:
- await message.channel.send(f'{message.author.mention} spun the wheel and got: {outcome}')
- # Display the puzzle with correctly guessed letters
- puzzle_display = ' '.join(revealed_letters)
- await message.channel.send(f'Current Puzzle: {puzzle_display}')
- await message.channel.send(f"The current category is: {current_category}")
- guessed_letters_display = ', '.join(guessed_letters)
- await message.channel.send(f'Letters Already Guessed: {guessed_letters_display}')
- else:
- await message.channel.send("Sorry, I couldn't determine who spun the wheel.")
- players[current_player]['ultraspun'] = True
- players[current_player]['spun'] = True
- # Handle other logic based on outcome
- if outcome.isdigit():
- await message.channel.send('Guess a letter using !guess or !solve to Solve.')
- guessed_correctly = False
- try:
- msg = await bot.wait_for('message', timeout=30,
- check=lambda m: m.author == current_player
- and not guessed_correctly
- and (m.content.startswith(
- '!solve') or m.content.startswith('!guess')))
- if msg.content.startswith('!solve') or msg.content.startswith('!guess'):
- # Proceed with guessing or solving
- pass
- else:
- # Inform the player and allow the player to continue their turn
- await message.channel.send("Invalid command. Please use !guess or !solve to proceed.")
- except asyncio.TimeoutError:
- await message.channel.send("You took too long to guess or solve. It's now the next player's turn.")
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f"It's {current_player.mention}'s turn to spin! use !spin")
- else:
- await message.channel.send("Sorry, you need to have a win count between 25 and 49 to use !ultraspin.")
- else:
- await message.channel.send('You already ultra spun')
- elif message.content == '!megaspin':
- # Read win counts from the file
- win_counts = {}
- with open('wincount.txt', 'r') as file:
- for line in file:
- # Split the line based on whitespace
- parts = line.strip().split()
- if len(parts) >= 2: # Ensure there are at least two parts
- user_id = parts[0]
- count = int(parts[1])
- win_counts[user_id] = count
- else:
- print(f"Ignoring invalid line in wincount.txt: {line.strip()}")
- if current_player is None:
- await message.channel.send("Sorry, there's no current player.")
- return
- if message.author == current_player and not players[current_player]['spun'] and not players[current_player][
- 'megaspun']:
- # Check if the author's win count is above the threshold
- author_id = str(message.author.id)
- if author_id in win_counts and win_counts[author_id] >= 50: # Adjust threshold as needed
- outcome = random.choice(MEGA_WHEEL_OUTCOMES)
- if message.author:
- await message.channel.send(f'{message.author.mention} spun the wheel and got: {outcome}')
- # Display the puzzle with correctly guessed letters
- puzzle_display = ' '.join(revealed_letters)
- await message.channel.send(f'Current Puzzle: {puzzle_display}')
- await message.channel.send(f"The current category is: {current_category}")
- guessed_letters_display = ', '.join(guessed_letters)
- await message.channel.send(f'Letters Already Guessed: {guessed_letters_display}')
- else:
- await message.channel.send("Sorry, I couldn't determine who spun the wheel.")
- players[current_player]['megaspun'] = True
- players[current_player]['spun'] = True
- # Handle other logic based on outcome
- if outcome.isdigit():
- await message.channel.send('Guess a letter using !guess or !solve to Solve.')
- guessed_correctly = False
- try:
- msg = await bot.wait_for('message', timeout=30,
- check=lambda m: m.author == current_player
- and not guessed_correctly
- and (m.content.startswith(
- '!solve') or m.content.startswith('!guess')))
- if msg.content.startswith('!solve') or msg.content.startswith('!guess'):
- # Proceed with guessing or solving
- pass
- else:
- # Inform the player and allow the player to continue their turn
- await message.channel.send("Invalid command. Please use !guess or !solve to proceed.")
- except asyncio.TimeoutError:
- await message.channel.send("You took too long to guess or solve. It's now the next player's turn.")
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f"It's {current_player.mention}'s turn to spin! use !spin")
- else:
- await message.channel.send("Sorry, you need to have a win count of 50 or more to use !megaspin.")
- else:
- await message.channel.send('You already mega spun')
- elif message.content == '!guess':
- # Handle letter guessing
- if current_player and message.author == current_player and players[current_player][
- 'spun'] and not guessed_correctly:
- # Ask the player to guess a letter
- await message.channel.send('Which letter would you like to guess?')
- def check(m):
- return m.author == current_player and len(m.content) == 1 and m.content.isalpha()
- try:
- # Wait for the player's response with a timeout of 30 seconds
- guess_message = await bot.wait_for('message', check=check, timeout=60)
- # Get the guessed letter from the message content
- guessed_letter = guess_message.content.strip().lower()
- # Check if the guessed letter has already been guessed
- if guessed_letter in guessed_letters:
- await message.channel.send('This letter has already been guessed! Skipping your turn.')
- # Move on to the next player
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- return # Skip the rest of the handling for this guess
- if guessed_letter not in guessed_letters:
- guessed_letters.append(guessed_letter)
- # Check if the guessed letter is in the puzzle
- if guessed_letter in current_puzzle.lower():
- for i, char in enumerate(current_puzzle):
- if char.lower() == guessed_letter:
- revealed_letters[i] = char
- # Update the scoreboard with the points from the spin
- if outcome.isdigit():
- # Calculate points based on the occurrence of the guessed letter
- if guessed_letter in current_puzzle.lower():
- points = int(outcome)
- scoreboard[current_player] += points
- # Display the current scoreboard
- await message.channel.send('Turn ended! Scores:')
- for player, score in scoreboard.items():
- await message.channel.send(f'{player.mention}: {score}')
- # Check if all letters have been guessed correctly
- guessed_correctly = all(char.isalpha() or char == ' ' for char in revealed_letters)
- players[current_player]['spun'] = False
- # If outcome was "Spin Again", prompt the player to spin again
- if outcome == "Spin Again":
- await message.channel.send('Use !spin to spin again.')
- else:
- # Remind the player to spin again
- if current_player is not None:
- await message.channel.send(
- f'{current_player.mention}, it\'s your turn to spin again! use !spin')
- # Display guessed letters
- guessed_letters_display = ', '.join(guessed_letters)
- await message.channel.send(f'Letters Already Guessed: {guessed_letters_display}')
- else:
- await message.channel.send('Sorry, the guessed letter is not in the puzzle.')
- # Move on to the next player
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- # Check if all letters have been guessed correctly and prompt the player to solve the puzzle
- if '-' not in revealed_letters:
- await message.channel.send(
- 'All letters have been guessed correctly! Use !spin then !solve to solve the puzzle.')
- except asyncio.TimeoutError:
- await message.channel.send('You took too long to guess.')
- # Move on to the next player
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- else:
- await message.channel.send('It\'s not your turn!')
- elif message.content == '!solve':
- # Handle solving the puzzle
- # Handle solving the puzzle
- if current_player and message.author == current_player and players[current_player]['spun']:
- await message.channel.send('Type the puzzle to solve it.')
- def check_solution(m):
- return m.author == current_player
- try:
- # Wait for the player's response with a timeout of 90 seconds
- solve_message = await bot.wait_for('message', check=check_solution, timeout=120)
- # Check if the solution matches the current puzzle (case-insensitive comparison)
- if solve_message.content.strip().lower() == current_puzzle.lower():
- # Award the player their current wheel outcome
- if outcome.isdigit():
- points = int(outcome)
- scoreboard[current_player] += points
- await message.channel.send(
- f'Congratulations! You solved the puzzle and earned {points} points!')
- # Display the current scoreboard
- await message.channel.send('Final Scores:')
- for player, score in scoreboard.items():
- await message.channel.send(f'{player.mention}: {score}')
- await end_game(message.channel)
- else:
- await message.channel.send('You cannot earn points for a non-numeric wheel outcome.')
- # Move on to the next player
- current_player = next_player()
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- # Reset solve_attempted flag
- solve_attempted = False
- else:
- await message.channel.send(
- 'Sorry, that is not the correct solution. It\'s now the next player\'s turn.')
- # Move on to the next player
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- solve_attempted = False # Reset the solve_attempted flag
- except asyncio.TimeoutError:
- await message.channel.send('You took too long to solve the puzzle.')
- # Move on to the next player
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- elif current_player and message.author == current_player and not players[current_player]['spun']:
- await message.channel.send('Please spin before solving.')
- else:
- await message.channel.send('It\'s not your turn!')
- elif solve_attempted:
- # Check if the solve_attempted flag is True
- if current_player and message.author == current_player and players[current_player]['spun']:
- # Skip the player's turn if they attempted to solve the puzzle but provided an incorrect solution
- await message.channel.send('That is incorrect. It\'s now the next player\'s turn.')
- current_player = next_player()
- for player in players.keys():
- players[player]['spun'] = False
- if current_player is not None:
- await message.channel.send(f'It\'s {current_player.mention}\'s turn to spin! use !spin')
- solve_attempted = False # Reset the solve_attempted flag
- # Handle the !reset command
- elif message.content == '!reset':
- # Check if the user who sent the command is authorized to reset the game
- if message.author == game_initiator:
- # Call the reset_game function to end the current game
- reset_game()
- await message.channel.send('Game reset! You can start a new game using !ssw.')
- else:
- await message.channel.send('You are not authorized to reset the game.')
- # Function to update win count for a player
- def update_win_count(player_id):
- wincount_file = "wincount.txt"
- if os.path.exists(wincount_file):
- with open(wincount_file, "r") as file:
- lines = file.readlines()
- win_counts = {}
- for line in lines:
- parts = line.split()
- if len(parts) >= 2:
- player = parts[0]
- wins = int(parts[1])
- win_counts[player] = wins
- if str(player_id) in win_counts:
- win_counts[str(player_id)] += 1
- else:
- win_counts[str(player_id)] = 1
- with open(wincount_file, "w") as file:
- for player, wins in win_counts.items():
- file.write(f"{player} {wins}\n")
- def read_win_counts():
- win_counts = {}
- with open('wincount.txt', 'r') as file:
- for line in file:
- player_id, win_count = line.strip().split()
- win_counts[player_id] = int(win_count)
- return win_counts
- # Function to end the game
- async def end_game(channel):
- global game_created, game_started, current_player, current_puzzle, revealed_letters, scoreboard, \
- guessed_correctly, outcome, solve_attempted, game_initiator, current_category
- # Determine the winner based on the scores
- winner = max(scoreboard, key=scoreboard.get) if scoreboard else None
- # Display the winner if there is one
- if winner:
- # Update win count
- update_win_count(winner.id) # Assuming winner is a Discord Member object
- # Read win count from file
- with open("wincount.txt", "r") as file:
- win_counts = {line.split()[0]: int(line.split()[1]) for line in file.readlines()}
- # Display the winner and their win count
- await channel.send(
- f'Congratulations to {winner.mention} for winning with a score of {scoreboard[winner]} points! ')
- await channel.send(f'Total win count: {win_counts.get(str(winner.id), 0)}')
- else:
- await channel.send('Thank you for playing!')
- # Reset game state
- game_created = False
- game_started = False
- current_player = None
- current_puzzle = ""
- revealed_letters = []
- scoreboard = {}
- guessed_correctly = False
- outcome = None
- solve_attempted = False
- game_initiator = None
- current_category = None
- # Function to switch to the next player
- def next_player():
- global players, current_player
- if current_player is not None:
- players_list = list(players.keys())
- current_index = players_list.index(current_player)
- next_index = (current_index + 1) % len(players_list)
- return players_list[next_index]
- else:
- return None
- # Run the bot
- bot.run('')
Add Comment
Please, Sign In to add comment