feat: add 7 new commands — hangman, scramble, wyr, riddle, roast, story, debate
- !hangman: AI picks a 5-8 letter word with hint; players !guess letters/words, 6 wrong = dead - !scramble: AI picks a word, scrambles it; first correct answer in chat wins (45s timeout) - !wyr: AI generates Would You Rather with 🅰️/🅱️ reaction voting, 30s reveal - !riddle: AI generates riddle monitored for 60s, substring match in chat wins - !roast: AI roasts a target using BALL_MODEL with special Jared/Wynter lore - !story: collaborative story with !story add <line> and !story end (AI conclusion, max 10 lines) - !debate: AI writes FOR/AGAINST arguments for any topic using ASK_MODEL - callbacks.py: route all non-command messages through scramble/riddle answer checkers - help: updated categories to include all new commands
This commit is contained in:
@@ -4,7 +4,7 @@ from functools import wraps
|
||||
from nio import AsyncClient
|
||||
|
||||
from config import BOT_PREFIX, MATRIX_USER_ID
|
||||
from commands import COMMANDS, metrics
|
||||
from commands import COMMANDS, metrics, check_scramble_answer, check_riddle_answer
|
||||
from welcome import handle_welcome_reaction, handle_space_join, SPACE_ROOM_ID
|
||||
|
||||
logger = logging.getLogger("matrixbot")
|
||||
@@ -42,6 +42,13 @@ class Callbacks:
|
||||
return
|
||||
|
||||
body = event.body.strip() if event.body else ""
|
||||
|
||||
# Check active non-command games that monitor all room messages
|
||||
if body and not body.startswith(BOT_PREFIX):
|
||||
await check_scramble_answer(self.client, room.room_id, event.sender, body)
|
||||
await check_riddle_answer(self.client, room.room_id, event.sender, body)
|
||||
return
|
||||
|
||||
if not body.startswith(BOT_PREFIX):
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user