actually use fake console

This commit is contained in:
nin0dev 2024-12-23 14:45:54 -05:00
parent f3efc95a4a
commit e992e86cfd
Signed by: nin0
SSH key fingerprint: SHA256:Is2DvJdw1OkSopR4wKJfdWV0fZhMLxpnCs1P1nPhIgA
2 changed files with 5 additions and 5 deletions

View file

@ -35,12 +35,12 @@ export default definePlugin({
if (args[1] && args[1].value) { if (args[1] && args[1].value) {
sendMessage(getCurrentChannel()!.id, { 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 { else {
sendBotMessage(getCurrentChannel()!.id, { 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) { if (args[1] && args[1].value) {
sendMessage(getCurrentChannel()!.id, { sendMessage(getCurrentChannel()!.id, {
content: "```js\n" + result + "\n```" content: "```\n" + args[0].value + "\n```\n\n```js\n" + result + "\n```"
}); });
} }
else { else {
sendBotMessage(getCurrentChannel()!.id, { sendBotMessage(getCurrentChannel()!.id, {
content: "```js\n" + result + "\n```" content: "```\n" + args[0].value + "\n```\n\n```js\n" + result + "\n```"
}); });
} }
}, },

View file

@ -41,5 +41,5 @@ export async function evalCode(_, code: string) {
var result = e; var result = e;
} }
return result; return `${result}\n\n${console._lines.join("\n")}`;
} }