diff options
author | Mikhail Kirillov <w96k@runbox.com> | 2024-10-09 04:53:26 +0400 |
---|---|---|
committer | Mikhail Kirillov <w96k@runbox.com> | 2024-10-09 22:46:19 +0400 |
commit | 662342863e37e8661f818218df7bb72bc18bf4eb (patch) | |
tree | 79ff9b3884a36e7afec820a8b7c3f235f2e6f1f1 /utils.py | |
parent | 0d48ea28aeb8a6290d2aeab202efa9c8d6e30fe3 (diff) |
Add movies commands
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) + "`" |