I have a Looping mand on my Discord Bot where you can repeat songs in a voice channel. Although when I run the mand, it shows a message that its going to loop the current song:
But then when the song ends (it should repeat itself again) the bot disconnects from voice channel. It uses YTDL-Core. Any Idea on how to solve this? Repeat.JS
let { RichEmbed } = require('discord.js')
const config = require('../../config.json')
exports.run = async(client, msg, args) => {
const serverQueue = client.queue.get(msg.guild.id);
if (!msg.member.voiceChannel) return msg.channel.send('You are not in a voice channel!');
if(!serverQueue) return msg.channel.send('Not playing anything right now');
if(serverQueue.voiceChannel.id !== msg.member.voiceChannel.id) return msg.channel.send(`You must be in **${serverQueue.voiceChannel.name}** to loop the queue`);
serverQueue.loop = !serverQueue.loop;
client.queue.set(msg.guild.id, serverQueue);
if(serverQueue.loop) return msg.channel.send('**
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745566533a4633427.html
评论列表(0条)