Co-authored-by: New-dev0 <New-dev0@users.noreply.github.com> Co-authored-by: Aditya <me@xditya.me> Co-authored-by: Amit Sharma <48654350+buddhhu@users.noreply.github.com> Co-authored-by: sppidy <sppidy@users.noreply.github.com> Co-authored-by: Arnab Paryali <Arnabxd@users.noreply.github.com> Co-authored-by: divkix <divkix@users.noreply.github.com> Co-authored-by: hellboi_atul <hellboi-atul@users.noreply.github.com> Co-authored-by: Programming Error <error@notavailable.live>
54 lines
1.2 KiB
Python
54 lines
1.2 KiB
Python
# Ultroid - UserBot
|
|
# Copyright (C) 2021 TeamUltroid
|
|
#
|
|
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
|
|
# PLease read the GNU Affero General Public License in
|
|
# <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
|
|
|
|
"""
|
|
✘ Commands Available -
|
|
|
|
•`{i}addclean`
|
|
Clean all Upcoming action msg in added chat like someone joined/left/pin etc.
|
|
|
|
•`{i}remclean`
|
|
Remove chat from database.
|
|
|
|
•`{i}listclean`
|
|
To get list of all chats where its activated.
|
|
|
|
"""
|
|
|
|
from pyUltroid.functions.clean_db import *
|
|
|
|
from . import *
|
|
|
|
|
|
@ultroid_cmd(pattern="addclean$", admins_only=True)
|
|
async def _(e):
|
|
add_clean(e.chat_id)
|
|
await eod(e, "Added Clean Action Setting For this Chat")
|
|
|
|
|
|
@ultroid_cmd(pattern="remclean$")
|
|
async def _(e):
|
|
rem_clean(e.chat_id)
|
|
await eod(e, "Removed Clean Action Setting For this Chat")
|
|
|
|
|
|
@ultroid_cmd(pattern="listclean$")
|
|
async def _(e):
|
|
k = udB.get("CLEANCHAT")
|
|
if k:
|
|
k = k.split(" ")
|
|
o = ""
|
|
for x in k:
|
|
try:
|
|
title = e.chat.title
|
|
except BaseException:
|
|
title = "`Invalid ID`"
|
|
o += x + " " + title + "\n"
|
|
await eor(e, o)
|
|
else:
|
|
await eod(e, "`No Chat Added`")
|