taslim19
Initial commit
80287e2
raw
history blame contribute delete
701 Bytes
from pyrogram import filters
from Devine import app
from Devine.misc import SUDOERS
from Devine.utils.database import add_off, add_on
from Devine.utils.decorators.language import language
@app.on_message(filters.command(["logger"]) & SUDOERS)
@language
async def logger(client, message, _):
usage = _["log_1"]
if len(message.command) != 2:
return await message.reply_text(usage)
state = message.text.split(None, 1)[1].strip().lower()
if state == "enable":
await add_on(2)
await message.reply_text(_["log_2"])
elif state == "disable":
await add_off(2)
await message.reply_text(_["log_3"])
else:
await message.reply_text(usage)