- Timestamp:
- Oct 10, 2024, 4:12:00 AM (5 weeks ago)
- Branches:
- master
- Children:
- 8d2d5ac
- Parents:
- 6623428
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
utils.py
r6623428 r9be02d9 11 11 12 12 from telegram.ext import ContextTypes 13 13 from collections import deque 14 14 15 15 def context_init(context: ContextTypes.DEFAULT_TYPE): … … 24 24 context.chat_data["movies"]: list[dict] = [] 25 25 26 if "events" not in context.chat_data: 27 context.chat_data["events"]: list[dict] = [] 28 26 29 return context 27 30 … … 33 36 def create_users_string(users: list[str]) -> str: 34 37 return "`" + ", ".join(users) + "`" 38 39 40 def choose_next_user(users: list[dict]) -> list[dict]: 41 users = deque(users) 42 users.rotate(-1) # -1 moves list to left by 1 element 43 44 return list(users)
Note:
See TracChangeset
for help on using the changeset viewer.