This commit is contained in:
yasirarism 2023-07-04 10:37:23 +07:00 committed by GitHub
parent dcfb7e949a
commit 1ba43806d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ async def handle_error(
"An Internal Error Occurred while Processing your Command, the Logs have been sent to the Owners of this Bot. Sorry for Inconvenience" "An Internal Error Occurred while Processing your Command, the Logs have been sent to the Owners of this Bot. Sorry for Inconvenience"
) )
await m._client.send_document( await m._client.send_document(
LOG_CHANNEL, crash_{tgl_now.strftime('%d %B %Y')}.txt, caption="Crash Report of this Bot\n{cap_day}" LOG_CHANNEL, "crash_{tgl_now.strftime('%d %B %Y')}.txt", caption="Crash Report of this Bot\n{cap_day}"
) )
if isinstance(m, pyrogram.types.CallbackQuery): if isinstance(m, pyrogram.types.CallbackQuery):
with contextlib.suppress(Exception): with contextlib.suppress(Exception):
@ -80,7 +80,7 @@ async def handle_error(
"An Internal Error Occurred while Processing your Command, the Logs have been sent to the Owners of this Bot. Sorry for Inconvenience" "An Internal Error Occurred while Processing your Command, the Logs have been sent to the Owners of this Bot. Sorry for Inconvenience"
) )
await m.message._client.send_document( await m.message._client.send_document(
LOG_CHANNEL, crash_{tgl_now.strftime('%d %B %Y')}.txt, caption="Crash Report of this Bot\n{cap_day}" LOG_CHANNEL, "crash_{tgl_now.strftime('%d %B %Y')}.txt", caption="Crash Report of this Bot\n{cap_day}"
) )
os.remove(crash_{tgl_now.strftime('%d %B %Y')}.txt) os.remove("crash_{tgl_now.strftime('%d %B %Y')}.txt")
return True return True