summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/utils.py b/utils.py
index 4b28c03..93ad3ed 100644
--- a/utils.py
+++ b/utils.py
@@ -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) + "`"