Error using discord-buttons: quot;Class extends value undefined is not a constructor or nullquot;(使用不和谐按钮时出错:“类扩展值未定义不是构造函数或空值)
问题描述
I tried to make a button in Discord.js. However, when I wrote the code, I found that there was an error during startup.
I don't know why this error is happening. I checked many related questions online, but none of my problems were solved, and I even became even more confused.
This is my code:
This is the error message:
In Discord.js v13, the API message class has been renamed to MessagePayload. APIMessage
would therefore be undefined
.
This error is occurring in the discord-buttons
module. Discord.js v13 supports buttons so you do not need this module. See the Discord.js guide on buttons for more details.
To send a button, you could use this code:
You should also take a look at the Discord.js v13 upgrade guide.
这篇关于使用不和谐按钮时出错:“类扩展值未定义不是构造函数或空值"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!