mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 11:04:51 +00:00
fix
This commit is contained in:
parent
67746303f3
commit
6ea9bf9d98
1 changed files with 11 additions and 11 deletions
|
|
@ -158,12 +158,12 @@ async def evaluation_cmd_t(_, m):
|
||||||
try:
|
try:
|
||||||
await aexec(cmd, _, m)
|
await aexec(cmd, _, m)
|
||||||
except NameError as e:
|
except NameError as e:
|
||||||
trace_output = "<b>❌ MISSING VARIABEL:</b>\n"
|
trace_output = "❌ MISSING VARIABEL:\n"
|
||||||
trace_output += f"<code>{e}</code>"
|
trace_output += f"{e}"
|
||||||
exc = trace_output
|
exc = trace_output
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
trace_output = "<b>❌ MISSING ATTRIBUTE:</b>\n"
|
trace_output = "❌ MISSING ATTRIBUTE:\n"
|
||||||
trace_output += f"<code>{e}</code>"
|
trace_output += f"{e}"
|
||||||
exc = trace_output
|
exc = trace_output
|
||||||
except SyntaxError as e:
|
except SyntaxError as e:
|
||||||
trace = traceback.format_exc()
|
trace = traceback.format_exc()
|
||||||
|
|
@ -173,21 +173,21 @@ async def evaluation_cmd_t(_, m):
|
||||||
row_2 = splitted[end_split - 3]
|
row_2 = splitted[end_split - 3]
|
||||||
row_3 = splitted[end_split - 2]
|
row_3 = splitted[end_split - 2]
|
||||||
compiles = row_1 + "\n" + row_2 + "\n" + row_3
|
compiles = row_1 + "\n" + row_2 + "\n" + row_3
|
||||||
trace_output = "<b>⚙️ SYNTAX ERROR:</b>\n"
|
trace_output = "⚙️ SYNTAX ERROR:\n"
|
||||||
trace_output += f"<code>{compiles}</code>"
|
trace_output += f"{compiles}"
|
||||||
exc = trace_output
|
exc = trace_output
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
trace_output = "<b>🧮 VALUE ERROR:</b>\n"
|
trace_output = "🧮 VALUE ERROR:\n"
|
||||||
trace_output += f"<code>{e}</code>"
|
trace_output += f"{e}"
|
||||||
exc = trace_output
|
exc = trace_output
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
#trace = traceback.format_exc()
|
#trace = traceback.format_exc()
|
||||||
""" Periksa apakah error regexnya tertangkap"""
|
""" Periksa apakah error regexnya tertangkap"""
|
||||||
match = re.search(r"Telegram says: .+", str(e))
|
match = re.search(r"Telegram says: .+", str(e))
|
||||||
trace_output = "<b>⚠️ COMMON ERROR:</b>\n"
|
trace_output = "⚠️ COMMON ERROR:\n"
|
||||||
trace_output += f"<code>{e}</code>"
|
trace_output += f"{e}"
|
||||||
if match:
|
if match:
|
||||||
trace_output = f"<code>👀 {match[0]}</code>"
|
trace_output = f"👀 {match[0]}"
|
||||||
exc = trace_output
|
exc = trace_output
|
||||||
|
|
||||||
stdout = redirected_output.getvalue()
|
stdout = redirected_output.getvalue()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue