【发布时间】:2021-05-29 04:50:12
【问题描述】:
我正在尝试制作一个票务系统,该系统创建一个频道,然后在该频道中发送一个嵌入。
但我得到了TypeError Cannot read property 'id' of undefined。这是我的代码 sn-p:
const openedTicket = message.guild.channels.cache.find((r) => r.name === `${message.author.username}s-ticket`);
const openedEmbed = new Discord.MessageEmbed().setDescription("Support will be with you shortly." + "To close this ticket react with :lock:");
setTimeout(function () {
client.channels
.get(openedTicket.id)
.send(openedEmbed)
.then((msg) => {
msg.react("????");
});
}, 1000);
【问题讨论】:
标签: javascript node.js discord discord.js