当我去第一台服务器时,我使用命令保存数组 第二台服务器使用命令保存数组,但保存相同
我想要它使用另一个新阵列,我该怎么做?
const Music_Queue = new Array();
class Music {
constructor() {
this.connection = {};
}
play(msg) {
//if Bot Not Join The Server
if (!this.connection[msg.guild.id])
{
music.join(msg);
}
//RePlace "!Play",Get Url
const musicURL = msg.content.replace(`${prefix}play`, '');
const voiceChannel = msg.member.voice.channel;
if(Music_Queue.length == 0)
{
Music_Queue[0] = musicURL;
music.playmusic(Music_Queue[0],voiceChannel,msg);
}
else
{
Music_Queue[Music_Queue.length + 1] = musicURL;
getInfo(musicURL).then(info => {
const exampleEmbed = new Discord.MessageEmbed()
.setColor('#0FFFFF')
.addField(`Add Music!『 ${info.items[0].title} 』`)
.setTimestamp();
msg.channel.send(exampleEmbed);
})
}
}
顺便说一下,我的数组命令没有完成!
一只斗牛犬
相关分类