From a91720c598a56e5fa793b059f70d41f9297f34d4 Mon Sep 17 00:00:00 2001 From: Essem Date: Tue, 6 Jul 2021 07:53:09 -0500 Subject: [PATCH] Some fixes --- classes/musicCommand.js | 2 +- commands/general/reload.js | 2 +- commands/general/soundreload.js | 2 +- shard.js | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/musicCommand.js b/classes/musicCommand.js index 98ec336..a7a1a04 100644 --- a/classes/musicCommand.js +++ b/classes/musicCommand.js @@ -3,7 +3,7 @@ const soundPlayer = require("../utils/soundplayer.js"); class MusicCommand extends Command { constructor(client, cluster, worker, ipc, message, args, content, specialArgs) { - super(client, cluster, ipc, message, args, content, specialArgs); + super(client, cluster, worker, ipc, message, args, content, specialArgs); this.connection = soundPlayer.players.get(message.channel.guild.id); } diff --git a/commands/general/reload.js b/commands/general/reload.js index e96ed6c..9276243 100644 --- a/commands/general/reload.js +++ b/commands/general/reload.js @@ -6,7 +6,7 @@ class ReloadCommand extends Command { return new Promise((resolve) => { if (this.message.author.id !== process.env.OWNER) resolve("Only the bot owner can reload commands!"); if (this.args.length === 0) resolve("You need to provide a command to reload!"); - this.ipc.broadcast("reload", { cmd: this.args[0] }); + this.ipc.broadcast("reload", this.args[0]); this.ipc.register("reloadSuccess", () => { this.ipc.unregister("reloadSuccess"); this.ipc.unregister("reloadFail"); diff --git a/commands/general/soundreload.js b/commands/general/soundreload.js index 8d6a766..e349ccb 100644 --- a/commands/general/soundreload.js +++ b/commands/general/soundreload.js @@ -10,7 +10,7 @@ class SoundReloadCommand extends Command { this.ipc.register("soundReloadSuccess", (msg) => { this.ipc.unregister("soundReloadSuccess"); this.ipc.unregister("soundReloadFail"); - resolve(`Successfully connected to ${msg.length} Lavalink node(s).`); + resolve(`Successfully connected to ${msg.msg.length} Lavalink node(s).`); }); this.ipc.register("soundReloadFail", () => { this.ipc.unregister("soundReloadSuccess"); diff --git a/shard.js b/shard.js index bdc6cfd..60dc6b3 100644 --- a/shard.js +++ b/shard.js @@ -60,9 +60,9 @@ class Shard extends BaseClusterWorker { } this.ipc.register("reload", async (message) => { - const result = await handler.unload(message.cmd); + const result = await handler.unload(message.msg); if (result) return this.ipc.broadcast("reloadFail", { result: result }); - const result2 = await handler.load(collections.paths.get(message.cmd)); + const result2 = await handler.load(collections.paths.get(message.msg)); if (result2) return this.ipc.broadcast("reloadFail", { result: result2 }); return this.ipc.broadcast("reloadSuccess"); });