remove one from db
This commit is contained in:
parent
bd9dbb4c31
commit
5cb4c8d7aa
@ -14,6 +14,7 @@ from config import BOT_USERNAME as bname
|
|||||||
from driver.core import bot
|
from driver.core import bot
|
||||||
from driver.filters import command
|
from driver.filters import command
|
||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
|
from driver.database.dbchat import remove_served_chat
|
||||||
from driver.decorators import bot_creator, sudo_users_only, errors
|
from driver.decorators import bot_creator, sudo_users_only, errors
|
||||||
from pyrogram.types import Message, InlineKeyboardButton, InlineKeyboardMarkup
|
from pyrogram.types import Message, InlineKeyboardButton, InlineKeyboardMarkup
|
||||||
|
|
||||||
@ -181,6 +182,7 @@ async def bot_leave_group(_, message):
|
|||||||
chat = message.text.split(None, 2)[1]
|
chat = message.text.split(None, 2)[1]
|
||||||
try:
|
try:
|
||||||
await bot.leave_chat(chat)
|
await bot.leave_chat(chat)
|
||||||
|
await remove_served_chat(chat)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
await message.reply_text(f"❌ procces failed\n\nreason: `{e}`")
|
await message.reply_text(f"❌ procces failed\n\nreason: `{e}`")
|
||||||
print(e)
|
print(e)
|
||||||
|
Loading…
Reference in New Issue
Block a user