From 6f6f6a78b36d29538ca4ef356ad770e4d4cfb9a7 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sat, 8 Jan 2022 12:27:39 +0500 Subject: [PATCH] fix --- commands/Music/clip.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/Music/clip.js b/commands/Music/clip.js index b951c873..17e7b167 100644 --- a/commands/Music/clip.js +++ b/commands/Music/clip.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command.js"), fs = require("fs"), - { joinVoiceChannel, createAudioResource, createAudioPlayer } = require("@discordjs/voice"); + { joinVoiceChannel, createAudioResource, createAudioPlayer, getVoiceConnection } = require("@discordjs/voice"); class Clip extends Command { constructor(client) { @@ -24,7 +24,7 @@ class Clip extends Command { const clip = args[0]; if (!voice) return message.error("music/play:NO_VOICE_CHANNEL"); - if (voice.members.find(user => user.id === this.client.user.id)) return message.error("music/clip:ACTIVE_CLIP"); + if (getVoiceConnection(message.guild.id)) return message.error("music/clip:ACTIVE_CLIP"); if (queue) return message.error("music/clip:ACTIVE_QUEUE"); if (!clip) return message.error("music/clip:NO_ARG"); if (!fs.existsSync(`./clips/${clip}.mp3`)) return message.error("music/clip:NO_FILE", { file: clip });