From e992e86cfdea875dd2ffdf361249da9a31eadff6 Mon Sep 17 00:00:00 2001 From: nin0dev Date: Mon, 23 Dec 2024 14:45:54 -0500 Subject: [PATCH] actually use fake console --- index.ts | 8 ++++---- native.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.ts b/index.ts index d8b8210..0c814c1 100644 --- a/index.ts +++ b/index.ts @@ -35,12 +35,12 @@ export default definePlugin({ if (args[1] && args[1].value) { sendMessage(getCurrentChannel()!.id, { - content: "```js\n" + result + "\n```" + content: "```\n" + args[0].value + "\n```\n\n```js\n" + `${result}\n\n${console._lines.join("\n")}` + "\n```" }); } else { sendBotMessage(getCurrentChannel()!.id, { - content: "```js\n" + result + "\n```" + content: "```\n" + args[0].value + "\n```\n```js\n" + `${result}\n\n${console._lines.join("\n")}` + "\n```" }); } }, @@ -69,12 +69,12 @@ export default definePlugin({ if (args[1] && args[1].value) { sendMessage(getCurrentChannel()!.id, { - content: "```js\n" + result + "\n```" + content: "```\n" + args[0].value + "\n```\n\n```js\n" + result + "\n```" }); } else { sendBotMessage(getCurrentChannel()!.id, { - content: "```js\n" + result + "\n```" + content: "```\n" + args[0].value + "\n```\n\n```js\n" + result + "\n```" }); } }, diff --git a/native.ts b/native.ts index 9ac9d86..3970480 100644 --- a/native.ts +++ b/native.ts @@ -41,5 +41,5 @@ export async function evalCode(_, code: string) { var result = e; } - return result; + return `${result}\n\n${console._lines.join("\n")}`; }