【发布时间】:2021-06-30 04:27:42
【问题描述】:
有没有办法将创建频道的用户放入 .setAuthor 中?我在https://discord.js.org/#/docs/main/stable/class/GuildChannel 中搜索过,但一无所获
client.on("channelCreate", function(channel) {
const logchannel = channel.guild.channels.cache.find(ch => ch.name === "logchannel")
if (!logchannel) return
const embed = new Discord.MessageEmbed()
.setTitle("Channel created)
.setDescription(`Channel <#${channel.id}> has created.`)
.setTimestamp()
.setAuthor(//user who created the channel)
logchannel.send(embed)
})
【问题讨论】:
标签: discord.js