actually use fake console
This commit is contained in:
parent
f3efc95a4a
commit
e992e86cfd
2 changed files with 5 additions and 5 deletions
8
index.ts
8
index.ts
|
@ -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```"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -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")}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue