music stuff

This commit is contained in:
Emily 2020-04-21 19:14:49 +10:00
parent 3a8e2a8840
commit 5d2e02221b
6 changed files with 111 additions and 5 deletions

View file

@ -67,7 +67,7 @@ exports.getVideoByQuery = async function (client, query) {
exports.play = async function (client, message, query, ignoreQueue) {
const guild = exports.getGuild(message.guild.id)
if (!message.member.voice.channel && !guild.voice.channel) {
if (!message.member.voice.channel && !guild.voiceChannel) {
return message.reply('You have to be connected to a voice channel to use this command!')
}
@ -168,7 +168,8 @@ exports.play = async function (client, message, query, ignoreQueue) {
} else {
guild.playing = true
guild.voice.channel = vc
guild.voiceChannel = vc
console.log(vc)
const connection = await vc.join()