const soundPlayer = require("../../utils/soundplayer.js"); const Command = require("../../classes/command.js"); class SoundReloadCommand extends Command { async run() { if (this.message.author.id !== process.env.OWNER) return "Only the bot owner can reload Lavalink!"; const soundStatus = await soundPlayer.checkStatus(); if (!soundStatus) { const length = await soundPlayer.connect(this.client); return `Successfully connected to ${length} Lavalink node(s).`; } else { return "I couldn't connect to any Lavalink nodes!"; } } static description = "Attempts to reconnect to all available Lavalink nodes"; static aliases = ["lava", "lavalink", "lavaconnect", "soundconnect"]; } module.exports = SoundReloadCommand;