Fix pastebin

This commit is contained in:
yasir 2023-02-13 23:00:57 +07:00
parent 206db5c01b
commit 5a6cf4ee3b

View file

@ -58,10 +58,17 @@ async def mediainfo(client, message):
}
response = await http.post("https://paste.yasir.eu.org/api/new", json=json_data)
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:
markup = None
await kirimPesan(message, " <b>MEDIA INFO</b>", reply_markup=markup, quote=True)
with io.BytesIO(str.encode(output)) as out_file:
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:
osremove(file_path)