mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
Fix mediainfo command for anon user
Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
parent
2372ba3129
commit
6ff87c413d
1 changed files with 2 additions and 4 deletions
|
|
@ -25,8 +25,6 @@ from utils import get_file_id
|
||||||
@app.on_message(filters.command(["mediainfo"], COMMAND_HANDLER))
|
@app.on_message(filters.command(["mediainfo"], COMMAND_HANDLER))
|
||||||
@use_chat_lang()
|
@use_chat_lang()
|
||||||
async def mediainfo(_, ctx: Message, strings):
|
async def mediainfo(_, ctx: Message, strings):
|
||||||
if not ctx.from_user:
|
|
||||||
return
|
|
||||||
if ctx.reply_to_message and ctx.reply_to_message.media:
|
if ctx.reply_to_message and ctx.reply_to_message.media:
|
||||||
process = await ctx.reply_msg(strings("processing_text"), quote=True)
|
process = await ctx.reply_msg(strings("processing_text"), quote=True)
|
||||||
file_info = get_file_id(ctx.reply_to_message)
|
file_info = get_file_id(ctx.reply_to_message)
|
||||||
|
|
@ -78,7 +76,7 @@ DETAILS
|
||||||
out_file.name = "MissKaty_Mediainfo.txt"
|
out_file.name = "MissKaty_Mediainfo.txt"
|
||||||
await ctx.reply_document(
|
await ctx.reply_document(
|
||||||
out_file,
|
out_file,
|
||||||
caption=strings("capt_media").format(ment=ctx.from_user.mention),
|
caption=strings("capt_media").format(ment=ctx.from_user.mention if ctx.from_user else ctx.sender_chat.title),
|
||||||
thumb="assets/thumb.jpg",
|
thumb="assets/thumb.jpg",
|
||||||
reply_markup=markup,
|
reply_markup=markup,
|
||||||
)
|
)
|
||||||
|
|
@ -121,7 +119,7 @@ DETAILS
|
||||||
out_file.name = "MissKaty_Mediainfo.txt"
|
out_file.name = "MissKaty_Mediainfo.txt"
|
||||||
await ctx.reply_document(
|
await ctx.reply_document(
|
||||||
out_file,
|
out_file,
|
||||||
caption=strings("capt_media").format(ment=ctx.from_user.mention),
|
caption=strings("capt_media").format(ment=ctx.from_user.mention if ctx.from_user else ctx.sender_chat.title),
|
||||||
thumb="assets/thumb.jpg",
|
thumb="assets/thumb.jpg",
|
||||||
reply_markup=markup,
|
reply_markup=markup,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue