Discord.js - 从 Slash 命令获取额外的文本

Discord.js - Getting additional Text from Slash Command

写 Discord.js Slash Command 时,是否可以获取在定义选项“外部”输入的文本?

假设我定义了以下 SlashCommand:

new SlashCommandBuilder()
        .setName('slashtest')
        .addStringOption(option => option.setName('name').setDescription('Test Option').setRequired(true))
        .addStringOption(option => option.setName('text').setDescription('Second Option').setRequired(true)),

在这个例子中,我想得到文本“Even more Stuff”

根据discord.js documentation and the discord developer documentation,您只能从discord斜杠命令'handler'中的命令选项中获取用户输入(输入'/'时弹出的菜单)。

根据我过去使用斜杠命令的经验,我认为不可能在选项之外检索用户输入。我想您可以为更具体的用户输入创建更多选项。