Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirarism authored Sep 1, 2024
1 parent 04294c7 commit 2e20b79
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions misskaty/plugins/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import pickle
import platform
import privatebinapi
import re
import sys
import traceback
Expand Down Expand Up @@ -145,14 +146,9 @@ async def log_file(_, ctx: Message, strings):
try:
with open("MissKatyLogs.txt", "r") as file:
content = file.read()
data = {
"value": content,
}
pastelog = await fetch.post(
"https://paste.yasirapi.eu.org/save", data=data, follow_redirects=True
)
pastelog = await privatebinapi.send_async("https://bin.yasirweb.eu.org", text=content, expiration="1week", formatting="sourcecode")
await msg.edit_msg(
f"<a href='{pastelog.url}'>Here the Logs</a>\nlog size: {get_readable_file_size(os.path.getsize('MissKatyLogs.txt'))}"
f"<a href='{pastelog['full_url']}'>Here the Logs</a>\nlog size: {get_readable_file_size(os.path.getsize('MissKatyLogs.txt'))}"
)
except Exception:
await ctx.reply_document(
Expand Down

0 comments on commit 2e20b79

Please sign in to comment.