我有这段代码,但是我不太确定为什么我得到(node:4890) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body name: This field is required
作为错误。而且我不确定如何解决此问题。
const loggingChannel = message.guild.channels.cache.find(ch => ch.name === "katsu-member-logs");
if(!loggingChannel) {
const channelName = "katsu-member-logs";
message.guild.channels.create(channelName, { parent: katsuCategory.id, topic: "Katsu Member Logs" }).then(c => {
const allUsers = message.guild.roles.cache.find(r => r.name === "@everyone")
c.updateOverwrite(allUsers, {
SEND_MESSAGES: false
})
});
} else {
await message.channel.send("Oops, it looks like `katsu-member-logs` channel already exist in this server");
}