Skip to content

Commit 31fae46

Browse files
authored
Merge pull request #53 from Takiyo0/3.0.4
3.0.4
2 parents bd6418f + b88a998 commit 31fae46

File tree

51 files changed

+2364
-532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2364
-532
lines changed

.idea/workspace.xml

Lines changed: 80 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ Pls read the docs before asking 🙏🙏🙏 There is a useful search feature th
2525
2626
## Metadata
2727

28-
> version: 3.0.3
28+
> version: 3.0.4
2929
> pre-release: false
30-
> Last build: 3-24-2024 21.36 PM
30+
> Last build: 5-10-2024 20.51 PM
3131
3232
## Plugins
3333
- Official [spotify plugin](https://npmjs.com/package/kazagumo-spotify)
3434
> npm i kazagumo-spotify
35-
- Additional [apple plugin](https://www.npmjs.com/package/kazagumo-apple)
35+
- Additional [apple plugin](https://www.npmjs.com/package/kazagumo-apple)
3636
> npm i kazagumo-apple
3737
- Additional [filter plugin](https://www.npmjs.com/package/kazagumo-filter)
3838
> npm i kazagumo-filter
@@ -146,9 +146,12 @@ kazagumo.shoukaku.on('ready', (name) => console.log(`Lavalink ${name}: Ready!`))
146146
kazagumo.shoukaku.on('error', (name, error) => console.error(`Lavalink ${name}: Error Caught,`, error));
147147
kazagumo.shoukaku.on('close', (name, code, reason) => console.warn(`Lavalink ${name}: Closed, Code ${code}, Reason ${reason || 'No reason'}`));
148148
kazagumo.shoukaku.on('debug', (name, info) => console.debug(`Lavalink ${name}: Debug,`, info));
149-
kazagumo.shoukaku.on('disconnect', (name, players, moved) => {
150-
if (moved) return;
151-
players.map(player => player.connection.disconnect())
149+
kazagumo.shoukaku.on('disconnect', (name, count) => {
150+
const players = [...kazagumo.shoukaku.players.values()].filter(p => p.node.name === name);
151+
players.map(player => {
152+
kazagumo.destroyPlayer(player.guildId);
153+
player.destroy();
154+
});
152155
console.warn(`Lavalink ${name}: Disconnected`);
153156
});
154157

@@ -227,7 +230,7 @@ client.login('');
227230
import { KazagumoTrack } from "kazagumo"; // ES6; don't laugh if it's wrong
228231

229232
let track = result.tracks[0] // the spotify track
230-
let convertedTrack = new KazagumoTrack(track.getRaw(), track.author);
233+
let convertedTrack = new KazagumoTrack(track.getRaw()._raw, track.author);
231234
player.play(convertedTrack);
232235
```
233236

0 commit comments

Comments
 (0)