File size: 391 Bytes
618430a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from .. import udB


def add_black_chat(chat_id):
    chat = udB.get_key("BLACKLIST_CHATS") or []
    if chat_id not in chat:
        chat.append(chat_id)
        return udB.set_key("BLACKLIST_CHATS", chat)


def rem_black_chat(chat_id):
    chat = udB.get_key("BLACKLIST_CHATS") or []
    if chat_id in chat:
        chat.remove(chat_id)
        return udB.set_key("BLACKLIST_CHATS", chat)