kang: fix egdecase and bot logic

This commit is contained in:
thedragonsinn
2025-05-04 18:18:27 +05:30
parent 82c09709af
commit 4c570d0092

View File

@@ -22,6 +22,8 @@ EMOJIS = ("☕", "🤡", "🙂", "🤔", "🔪", "😂", "💀")
async def save_sticker(file: Path | BytesIO) -> str:
bot = getattr(bot, "bot", bot)
sent_file = await bot.send_document(
chat_id=Config.LOG_CHAT, document=file, message_thread_id=Config.LOG_CHAT_THREAD_ID
)
@@ -208,11 +210,7 @@ async def kang(bot: BOT, message: Message):
response = await message.reply("<code>Processing...</code>")
_bot = getattr(bot, "bot", None)
if _bot:
replied = await replied.log()
bot = _bot
bot = getattr(bot, "bot", bot)
file_id, emoji = await media_func(message=replied, ff="-f" in message.flags)