Date: 30-8-2022 Co-Authored-By: Aditya <me@xditya.me> Co-Authored-By: Amit Sharma <48654350+buddhhu@users.noreply.github.com> Co-Authored-By: CyrusXD <79554993+Ashutosh1478@users.noreply.github.com> Co-Authored-By: Danish <danish@ultroid.tech> Co-Authored-By: TechiError <error@notavailable.live> Co-Authored-By: Arnab Paryali <arnabxd@pm.me>
16 lines
391 B
Python
16 lines
391 B
Python
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)
|