事件通道创建 .setauthor

时间:2021-04-03 17:16:48

标签: discord.js

有什么办法可以把创建频道的用户放在.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)  
})

1 个答案:

答案 0 :(得分:0)

我认为最好使用 AuditLogs,您可能想看看它。