Fix Telegraph CMD

Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
Yasir Aris M 2024-09-07 11:23:39 +07:00
parent 68c2385d89
commit 9aca2a8c7b

View file

@ -84,6 +84,8 @@ async def telegraph_paste(_, message):
msg = await message.reply_msg("`Pasting to Telegraph...`") msg = await message.reply_msg("`Pasting to Telegraph...`")
data = "" data = ""
limit = 1024 * 1024 limit = 1024 * 1024
if reply and not (reply.text or reply.document):
return await msg.edit_msg("**Reply to a text message or file to paste to Telegraph.**")
if reply and reply.document: if reply and reply.document:
if reply.document.file_size > limit: if reply.document.file_size > limit:
return await msg.edit_msg( return await msg.edit_msg(