我有过
“预期声明或声明”
错误,有人知道原因吗?
module.exports = {
name: 'profil',
description: 'Informacje o użytkowniku',
execute(message, args) {
const embed = new Discord.MessageEmbed();
.setTitle('Informacje o użytkowniku')
.addField('Nazwa użytkownika', message.author.username, true)
.addField('Obecny Serwer', message.guild.name, true)
.setColor(0xF1C40F)
.setThumbnail(message.author.displayAvatarURL(),
message.channel.send(embed)),
}发布于 2020-06-06 12:52:31
这一行:
const embed = new Discord.MessageEmbed();不应该在末尾有分号,因为您直接访问它的方法。
此外,您可能需要先实例化嵌入变量,然后单独发送:
const embed = new Discord.MessageEmbed()
.setTitle('Informacje o użytkowniku')
.addField('Nazwa użytkownika', message.author.username, true)
.addField('Obecny Serwer', message.guild.name, true)
.setColor(0xF1C40F)
.setThumbnail(message.author.avatarURL());
message.channel.send(embed);https://stackoverflow.com/questions/62231758
复制相似问题