Files
Ultroid-fork/pyUltroid/dB/logusers_db.py
Devesh Pal d8bd901072 Ultroid v0.7 Updates
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>
2022-08-30 16:05:58 +05:30

29 lines
610 B
Python

# Ultroid - UserBot
# Copyright (C) 2021-2022 TeamUltroid
#
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
# PLease read the GNU Affero General Public License in
# <https://github.com/TeamUltroid/pyUltroid/blob/main/LICENSE>.
from .. import udB
def get_logger():
return udB.get_key("LOGUSERS") or []
def is_logger(id_):
return id_ in get_logger()
def log_user(id_):
pmperm = get_logger()
pmperm.append(id_)
return udB.set_key("LOGUSERS", pmperm)
def nolog_user(id_):
pmperm = get_logger()
pmperm.remove(id_)
return udB.set_key("LOGUSERS", pmperm)