mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 17:44:50 +00:00
FIx
This commit is contained in:
parent
b106bb79df
commit
8221672d76
2 changed files with 42 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ from misskaty.core.decorator.permissions import adminsOnly
|
|||
__MODULE__ = "AFK"
|
||||
__HELP__ = """/afk [Reason > Optional] - Tell others that you are AFK (Away From Keyboard), so that your boyfriend or girlfriend won't look for you 💔.
|
||||
/afk [reply to media] - AFK with media.
|
||||
/afkdel - Enable auto delete AFK message in group (Only for group admin).
|
||||
/afkdel - Enable auto delete AFK message in group (Only for group admin). Default is **Enable**.
|
||||
Just type something in group to remove AFK Status."""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,47 @@ async def ytdownv2(_, message):
|
|||
await message.reply_photo(img, caption=caption, reply_markup=markup, quote=True)
|
||||
|
||||
|
||||
@app.on_callback_query(filters.regex(r"^yt_listall"))
|
||||
async def ytdl_listall_callback(_, cq: CallbackQuery):
|
||||
if cq.from_user.id != cq.message.reply_to_message.from_user.id:
|
||||
return await cq.answer("Not your task", True)
|
||||
callback = cq.data.split("|")
|
||||
async with iYTDL(
|
||||
log_group_id=0, cache_path="cache", ffmpeg_location="/usr/bin/mediaextract"
|
||||
) as ytdl:
|
||||
media, buttons = await ytdl.listview(callback[1])
|
||||
await cq.edit_message_media(
|
||||
media=media, reply_markup=buttons.add(cq.from_user.id)
|
||||
)
|
||||
|
||||
|
||||
@app.on_callback_query(filters.regex(r"^yt_extract_info"))
|
||||
async def ytdl_extractinfo_callback(_, cq: CallbackQuery):
|
||||
if cq.from_user.id != cq.message.reply_to_message.from_user.id:
|
||||
return await cq.answer("Not your task", True)
|
||||
await c_q.answer("Please Wait...")
|
||||
callback = cq.data.split("|")
|
||||
async with iYTDL(
|
||||
log_group_id=0, cache_path="cache", ffmpeg_location="/usr/bin/mediaextract"
|
||||
) as ytdl:
|
||||
if data := await ytdl.extract_info_from_key(callback[1]):
|
||||
if len(key) == 11:
|
||||
await cq.edit_message_text(
|
||||
text=data.caption,
|
||||
reply_markup=data.buttons.add(cq.from_user.id),
|
||||
)
|
||||
else:
|
||||
await cq.edit_message_media(
|
||||
media=(
|
||||
InputMediaPhoto(
|
||||
media=data.image_url,
|
||||
caption=data.caption,
|
||||
)
|
||||
),
|
||||
reply_markup=data.buttons.add(cq.from_user.id),
|
||||
)
|
||||
|
||||
|
||||
@app.on_callback_query(filters.regex(r"^yt_(gen|dl)"))
|
||||
async def ytdl_gendl_callback(_, cq: CallbackQuery):
|
||||
if cq.from_user.id != cq.message.reply_to_message.from_user.id:
|
||||
|
|
|
|||
Loading…
Reference in a new issue