Untitled

mail@pastecode.io avatar
unknown
python
a month ago
1.0 kB
1
Indexable
Never
allowed_channels(1015260651943383111, 1203433141205733376, 
error_message="Execute the command in the channel: <#1015260651943383111>")

if server_var("riddle_game") == "True":
    set_error(f"❌ {user.mention}, A game is already in progress")
else:
    update_server_var("riddle_game", "True")

RIDDLES_TOTAL = 15
MAX_PASS = 3
MAX_ATT = 3
TIMEOUT = 60
THRESHOLD = 75

CORRECT_MSG = "✅ Correct answer! Next riddle:"
INCORRECT_MSG = "❌ Incorrect answer. Try again! Remaining attempts: `{}`"

PASS_MSG = "🔄 Riddle skipped. Next one:"
PASS_WARN_MSG = "⚠️ No more passes available or it's the last riddle."

END_TIMEOUT_MSG = f"⏰ Time's up, {user.mention}. **GAME OVER.**"
END_MAX_ATT_MSG = f"❌ Maximum attempts reached (`{MAX_ATT}`). **GAME OVER.**"
END_CONGRATS_MSG = "## 🎉 Congratulations! You've completed the game!"

db = load_database("clz8durud000kdvyvjsrhhuze")
riddles = db.find(where={"theme": theme})
riddles = pyrandom.sample(riddles, RIDDLES_TOTAL) if len(riddles) >= RIDDLES_TOTAL else riddles
Leave a Comment