diff options
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -13,11 +13,22 @@ from telegram.ext import ContextTypes def context_init(context: ContextTypes.DEFAULT_TYPE): - ''' + """ Initialize chat context with starting values - ''' + """ if "users" not in context.chat_data: context.chat_data["users"]: list[str] = [] + if "movies" not in context.chat_data: + context.chat_data["movies"]: list[dict] = [] + return context + + +def normalize_username(username: str): + return username.replace("@", "") + + +def create_users_string(users: list[str]) -> str: + return "`" + ", ".join(users) + "`" |