使用命令更改频道名称并发送嵌入
Change Channel name with a command and also send embed with it
我正在制作一个 discord 机器人,它将更改频道的特定名称
代码
if(command === `${prefix}openslot`) {
let embed = new Discord.RichEmbed()
.setColor("#1bc643")
.setTitle("Sucessfully opened slot for PREMIUM RANK!")
.addField("Created At", message.author.createdAt)
.setDescription("SYSTEM");
message.channel.sendMessage(embed);
channel.setName('Reserved_Slot')
.then(newChannel => console.log(Channel's new name is ${newChannel.name}
))
.catch(console.error);
return;
}
我也是 discord.js 的新手(一个月前开始)
没关系,我自己找的
message.guild.channels.find("name", "general").setName("Testing");
感谢您纠正我的语法。
我正在制作一个 discord 机器人,它将更改频道的特定名称
代码
if(command === `${prefix}openslot`) {
let embed = new Discord.RichEmbed()
.setColor("#1bc643")
.setTitle("Sucessfully opened slot for PREMIUM RANK!")
.addField("Created At", message.author.createdAt)
.setDescription("SYSTEM");
message.channel.sendMessage(embed);
channel.setName('Reserved_Slot')
.then(newChannel => console.log(Channel's new name is ${newChannel.name}
))
.catch(console.error);
return;
}
我也是 discord.js 的新手(一个月前开始)
没关系,我自己找的
message.guild.channels.find("name", "general").setName("Testing");
感谢您纠正我的语法。