remove eval

This commit is contained in:
nin0 2025-04-30 19:27:13 -04:00
parent fe0df783a3
commit 3954122d58
Signed by: nin0
SSH key fingerprint: SHA256:NOoDnFVvZNFvqfXCIhzr6oCTDImZAbTTuyAysZ8Ufk8

View file

@ -68,12 +68,6 @@ client.on("ready", () => {
description: "...",
type: ApplicationCommandOptionTypes.BOOLEAN,
required: false
},
{
name: "eval",
description: "...",
type: ApplicationCommandOptionTypes.BOOLEAN,
required: false
}
]
}
@ -87,14 +81,8 @@ client.on("interactionCreate", async (interaction) => {
if (interaction.data.type === ApplicationCommandTypes.CHAT_INPUT) {
const content = interaction.data.options.getString("content", true);
const raw = interaction.data.options.getBoolean("raw");
const shouldEval = interaction.data.options.getBoolean("eval");
interaction.createFollowup(
shouldEval
? {
content: await evaluate(content, interaction)
}
: raw
interaction.createFollowup(raw
? JSON.parse(content)
: {
content