Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Embed 使用命令更改频道名称,并随命令发送嵌入_Embed_Discord.js - Fatal编程技术网

Embed 使用命令更改频道名称,并随命令发送嵌入

Embed 使用命令更改频道名称,并随命令发送嵌入,embed,discord.js,Embed,Discord.js,我正在制作一个discord bot,它将更改频道的特定名称 代码 .then(newChannel=>console.log(Channel的新名称是${newChannel.name}) .catch(控制台错误) 而且我对discord.js(一个月前开始)也是新手没关系,我自己找到的 message.guild.channels.find(“name”、“general”).setName(“Testing”); 谢谢你纠正我的语法 if(command === `${prefix}o

我正在制作一个discord bot,它将更改频道的特定名称

代码

.then(newChannel=>console.log(
Channel的新名称是${newChannel.name}
) .catch(控制台错误)


而且我对discord.js(一个月前开始)也是新手

没关系,我自己找到的

message.guild.channels.find(“name”、“general”).setName(“Testing”);
谢谢你纠正我的语法

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')
    return;
}