- Timestamp:
- Oct 9, 2024, 10:46:19 PM (5 weeks ago)
- Branches:
- master
- Children:
- 9be02d9
- Parents:
- 0d48ea2
- git-author:
- Mikhail Kirillov <w96k@…> (10/09/24 04:53:26)
- git-committer:
- Mikhail Kirillov <w96k@…> (10/09/24 22:46:19)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils.py
r0d48ea2 r6623428 14 14 15 15 def context_init(context: ContextTypes.DEFAULT_TYPE): 16 '''16 """ 17 17 Initialize chat context with starting values 18 '''18 """ 19 19 20 20 if "users" not in context.chat_data: 21 21 context.chat_data["users"]: list[str] = [] 22 22 23 if "movies" not in context.chat_data: 24 context.chat_data["movies"]: list[dict] = [] 25 23 26 return context 27 28 29 def normalize_username(username: str): 30 return username.replace("@", "") 31 32 33 def create_users_string(users: list[str]) -> str: 34 return "`" + ", ".join(users) + "`"
Note:
See TracChangeset
for help on using the changeset viewer.