mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-05 19:44:51 +00:00
Add pickle when restart
This commit is contained in:
parent
6fff16e4dd
commit
126ddc7715
1 changed files with 4 additions and 1 deletions
|
|
@ -37,8 +37,10 @@ async def log_file(bot, message):
|
||||||
"""Send log file"""
|
"""Send log file"""
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
text_file = open("MissKatyLogs.txt", "r")
|
||||||
|
data = text_file.read()
|
||||||
json_data = {
|
json_data = {
|
||||||
"content": open("MissKatyLogs.txt"),
|
"content": data,
|
||||||
"highlighting_language": "auto",
|
"highlighting_language": "auto",
|
||||||
"ephemeral": False,
|
"ephemeral": False,
|
||||||
"expire_at": 0,
|
"expire_at": 0,
|
||||||
|
|
@ -46,6 +48,7 @@ async def log_file(bot, 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']}"
|
||||||
|
text_file.close()
|
||||||
except:
|
except:
|
||||||
link = None
|
link = None
|
||||||
await message.reply_document(
|
await message.reply_document(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue