mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 22:55:00 +05:00
fix
This commit is contained in:
parent
10997d717d
commit
6f6f6a78b3
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
fs = require("fs"),
|
fs = require("fs"),
|
||||||
{ joinVoiceChannel, createAudioResource, createAudioPlayer } = require("@discordjs/voice");
|
{ joinVoiceChannel, createAudioResource, createAudioPlayer, getVoiceConnection } = require("@discordjs/voice");
|
||||||
|
|
||||||
class Clip extends Command {
|
class Clip extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -24,7 +24,7 @@ class Clip extends Command {
|
||||||
const clip = args[0];
|
const clip = args[0];
|
||||||
|
|
||||||
if (!voice) return message.error("music/play:NO_VOICE_CHANNEL");
|
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 (queue) return message.error("music/clip:ACTIVE_QUEUE");
|
||||||
if (!clip) return message.error("music/clip:NO_ARG");
|
if (!clip) return message.error("music/clip:NO_ARG");
|
||||||
if (!fs.existsSync(`./clips/${clip}.mp3`)) return message.error("music/clip:NO_FILE", { file: clip });
|
if (!fs.existsSync(`./clips/${clip}.mp3`)) return message.error("music/clip:NO_FILE", { file: clip });
|
||||||
|
|
Loading…
Reference in a new issue