Initial commit

This commit is contained in:
2026-05-13 23:38:18 +02:00
commit 8b053a7adb
21 changed files with 6642 additions and 0 deletions

19
bot_state.py Normal file
View File

@@ -0,0 +1,19 @@
"""Shared in-memory state. Import from here; never create a second copy."""
import asyncio
submissions: dict = {}
counter: int = 0
daily_submissions: dict = {}
welcome_messages: dict = {}
welcome_lock: asyncio.Lock = asyncio.Lock()
chat_sessions: dict = {}
chat_message_map: dict = {}
banned_chat_users: set = set()
upload_prompt_tasks: dict = {}
upload_prompt_msg_ids: dict = {} # user_id -> last prompt message_id
submitting_users: set = set()
chatroom_semipublic_group_messages: dict = {}
known_usernames: dict[int, str | None] = {}
backup_hashes: dict[str, str] = {} # file_unique_id -> sha256
confirmed_users: set[int] = set()
blacklisted_words: list[str] = []