mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-09 05:04:50 +00:00
Fix pastebin
This commit is contained in:
parent
206db5c01b
commit
5a6cf4ee3b
1 changed files with 13 additions and 6 deletions
|
|
@ -58,11 +58,18 @@ async def mediainfo(client, message):
|
||||||
}
|
}
|
||||||
response = await http.post("https://paste.yasir.eu.org/api/new", json=json_data)
|
response = await http.post("https://paste.yasir.eu.org/api/new", json=json_data)
|
||||||
link = f"https://paste.yasir.eu.org/{response.json()['id']}"
|
link = f"https://paste.yasir.eu.org/{response.json()['id']}"
|
||||||
markup = InlineKeyboardMarkup([[InlineKeyboardButton(text_, link)]])
|
markup = InlineKeyboardMarkup([[InlineKeyboardButton(text="💬 View in Web", url=link)]])
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
markup = None
|
markup = None
|
||||||
await kirimPesan(message, "ℹ️ <b>MEDIA INFO</b>", reply_markup=markup, quote=True)
|
with io.BytesIO(str.encode(output)) as out_file:
|
||||||
await process.delete()
|
out_file.name = "MissKaty_Mediainfo.txt"
|
||||||
|
await message.reply_document(
|
||||||
|
out_file,
|
||||||
|
caption=f"ℹ️ <b>MEDIA INFO</b>\n\n**Request by:** {message.from_user.mention}",
|
||||||
|
thumb="img/thumb.jpg",
|
||||||
|
reply_markup=markup,
|
||||||
|
)
|
||||||
|
await process.delete()
|
||||||
try:
|
try:
|
||||||
osremove(file_path)
|
osremove(file_path)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
@ -76,9 +83,9 @@ async def mediainfo(client, message):
|
||||||
except Exception:
|
except Exception:
|
||||||
return await editPesan(process, "Sepertinya link yang kamu kirim tidak valid, pastikan direct link dan bisa di download.")
|
return await editPesan(process, "Sepertinya link yang kamu kirim tidak valid, pastikan direct link dan bisa di download.")
|
||||||
body_text = f"""
|
body_text = f"""
|
||||||
MissKatyBot MediaInfo
|
MissKatyBot MediaInfo
|
||||||
{output}
|
{output}
|
||||||
"""
|
"""
|
||||||
# link = await post_to_telegraph(False, title, body_text)
|
# link = await post_to_telegraph(False, title, body_text)
|
||||||
try:
|
try:
|
||||||
json_data = {
|
json_data = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue