remove eval
This commit is contained in:
parent
fe0df783a3
commit
3954122d58
1 changed files with 1 additions and 13 deletions
14
index.js
14
index.js
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue