Some fixes
This commit is contained in:
parent
97050f0cf1
commit
a91720c598
4 changed files with 5 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
4
shard.js
4
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");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue