我目前在向我的 Discord JS 项目添加按钮时遇到问题,我正在使用 Typescript 和 Discord JS v14 来制作机器人。
我当前的问题是添加按钮,它给了我一个很长的错误,我无法自己找到解决方案,而且我还没有在网上找到解决方案。
是的,所有内容都已包含在内,并且机器人上的所有内容都正常运行,我只是在尝试添加按钮时收到错误。
这是有问题的代码片段:
return interaction.reply({
content: `There was an error while running the channel command. Please try again later. (${error})`,
ephemeral: true,
components: [new ActionRowBuilder({
components: [
new ButtonBuilder({
customId: '1',
label: 'yes',
style: ButtonStyle.Success
})
]
})]
});
Run Code Online (Sandbox Code Playgroud)
这是我收到的错误:
[{
"resource": "/c:/Users/Coby/Documents/GitHub/franksbot/src/commands/chanell.ts",
"owner": "typescript",
"code": "2769",
"severity": 8,
"message": "No overload matches this call.\n Overload 1 of 2, '(options: InteractionReplyOptions & { fetchReply: true; }): Promise<Message<boolean>>', gave the following …Run Code Online (Sandbox Code Playgroud)