javascript - How do you fix the loop command in Discord.JS - Stack Overflow

I have a Looping mand on my Discord Bot where you can repeat songs in a voice channel. Although when I

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

相关推荐

  • javascript - How do you fix the loop command in Discord.JS - Stack Overflow

    I have a Looping mand on my Discord Bot where you can repeat songs in a voice channel. Although when I

    6小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信