Skip to content

Commit

Permalink
update shoukaku for now
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Aug 15, 2024
1 parent 4284c36 commit 5329009
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/i18n": "^0.13.12",
"@types/node": "^22.1.0",
"@types/node": "^22.3.0",
"@types/signale": "^1.4.7",
"prisma": "^5.18.0",
"typescript": "^5.5.4"
Expand All @@ -52,7 +52,7 @@
"signale": "^1.4.0",
"topgg-autoposter": "^2.0.2",
"tslib": "^2.6.3",
"undici": "^6.19.6"
"undici": "^6.19.7"
},
"signale": {
"displayScope": true,
Expand Down
12 changes: 6 additions & 6 deletions src/structures/Dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ export default class Dispatcher {
this.nowPlayingMessage = null;
this.history = [];
this.player
.on("start", () => this.client.shoukaku.emit("trackStart", this.player, this.current, this))
.on("start", () => this.client.shoukaku.emit("trackStart" as any, this.player, this.current, this))
.on("end", () => {
if (!this.queue.length) {
this.client.shoukaku.emit("queueEnd", this.player, this.current, this);
this.client.shoukaku.emit("queueEnd" as any, this.player, this.current, this);
}
this.client.shoukaku.emit("trackEnd", this.player, this.current, this);
this.client.shoukaku.emit("trackEnd" as any, this.player, this.current, this);
})
.on("stuck", () => this.client.shoukaku.emit("trackStuck", this.player, this.current))
.on("closed", (...args) => this.client.shoukaku.emit("socketClosed", this.player, ...args));
.on("stuck", () => this.client.shoukaku.emit("trackStuck" as any, this.player, this.current))
.on("closed", (...args) => this.client.shoukaku.emit("socketClosed" as any, this.player, ...args));
}

get exists(): boolean {
Expand Down Expand Up @@ -132,7 +132,7 @@ export default class Dispatcher {
this.player.destroy();
this.client.queue.delete(this.guildId);
if (!this.stopped) {
this.client.shoukaku.emit("playerDestroy", this.player);
this.client.shoukaku.emit("playerDestroy" as any, this.player);
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/structures/Shoukaku.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ export default class ShoukakuClient extends Shoukaku {
});
this.client = client;
this.on("ready", (name, reconnected) => {
this.client.shoukaku.emit(reconnected ? "nodeReconnect" : "nodeConnect", name);
this.client.shoukaku.emit(reconnected ? "nodeReconnect" : ("nodeConnect" as any), name);
});
this.on("error", (name, error) => {
this.client.shoukaku.emit("nodeError", name, error);
this.client.shoukaku.emit("nodeError" as any, name, error);
});
this.on("close", (name, code, reason) => {
this.client.shoukaku.emit("nodeDestroy", name, code, reason);
this.client.shoukaku.emit("nodeDestroy" as any, name, code, reason);
});
this.on("disconnect", (name, count) => {
this.client.shoukaku.emit("nodeDisconnect", name, count);
this.client.shoukaku.emit("nodeDisconnect" as any, name, count);
});
this.on("debug", (name, reason) => {
this.client.shoukaku.emit("nodeRaw", name, reason);
this.client.shoukaku.emit("nodeRaw" as any, name, reason);
});
}
}
Expand Down

0 comments on commit 5329009

Please sign in to comment.