feat: management polish, !cancel, !wordlestats, welcome fixes
- Add !cancel command (anyone cancels own blackjack; PL50+ clears all room games) - Add !wordlestats top-level command (wraps wordle stats function) - Add !cleanwelcome admin command to purge stale welcome DM records - !help now hides management section from sub-PL50 users, hides !health from non-admins - !announce uses nio room cache for join_rule instead of an API call per room - Fix _INVITEALL_BLOCKED comment (Commands is knock-gated, not restricted) - welcome.py: skip duplicate DM if a pending welcome already exists for the user - welcome.py: add clean_stale_dm_messages() helper - welcome.py: replace no-op post_welcome_message with log_ready() - bot.py: update import/call to match welcome.py rename Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+2
-3
@@ -26,7 +26,7 @@ from config import (
|
||||
)
|
||||
from callbacks import Callbacks
|
||||
from utils import setup_logging
|
||||
from welcome import post_welcome_message
|
||||
from welcome import log_ready as _welcome_log_ready
|
||||
|
||||
logger = setup_logging(LOG_LEVEL)
|
||||
|
||||
@@ -179,8 +179,7 @@ async def main():
|
||||
# Trust devices after initial sync loads the device store
|
||||
await trust_devices(client)
|
||||
|
||||
# Post welcome message (idempotent — only posts if not already stored)
|
||||
await post_welcome_message(client)
|
||||
_welcome_log_ready()
|
||||
|
||||
logger.info("Bot ready as %s — listening for commands", MATRIX_USER_ID)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user