From 3d6e93f19a31a53a897f0c930a07cc68bc15e801 Mon Sep 17 00:00:00 2001 From: levina <82658782+levina-lab@users.noreply.github.com> Date: Mon, 25 Oct 2021 15:23:36 +0700 Subject: [PATCH] change --- cache/admins.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cache/admins.py diff --git a/cache/admins.py b/cache/admins.py new file mode 100644 index 0000000..7ae5016 --- /dev/null +++ b/cache/admins.py @@ -0,0 +1,15 @@ +from config import admins +from typing import Dict, List + + +admins: Dict[int, List[int]] = {} + + +def set(chat_id: int, admins_: List[int]): + admins[chat_id] = admins_ + + +def get(chat_id: int) -> List[int]: + if chat_id in admins: + return admins[chat_id] + return []