Skip to content

Commit 78216ee

Browse files
committed
v2.4.5 + re-stylings for everything and modifications on testBot
1 parent 9fb2fc7 commit 78216ee

Some content is hidden

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

58 files changed

+951
-812
lines changed

docs/astro.config.mjs

Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -5,103 +5,103 @@ import starlightTypeDoc, { typeDocSidebarGroup } from "starlight-typedoc"
55

66
// https://astro.build/config
77
export default defineConfig({
8-
site: "https://tomato6966.github.io/",
9-
base: "lavalink-client",
10-
integrations: [
11-
starlight({
12-
title: "Lavalink Client",
13-
social: {
14-
github: "https://github.com/Tomato6966/lavalink-client",
8+
site: "https://tomato6966.github.io/",
9+
base: "lavalink-client",
10+
integrations: [
11+
starlight({
12+
title: "Lavalink Client",
13+
social: {
14+
github: "https://github.com/Tomato6966/lavalink-client",
1515
discord: "https://discord.gg/AsgD3gtPnb",
1616
email: "mailto:chrissy@mivator.com",
17-
},
18-
editLink: {
19-
baseUrl: "https://github.com/Tomato6966/lavalink-client/tree/main",
20-
},
21-
plugins: [
22-
// Generate the documentation.
23-
starlightTypeDoc({
24-
entryPoints: ["../src/structures/**/*.ts"],
25-
tsconfig: "../tsconfig.json",
26-
typeDoc: {
27-
useCodeBlocks: true,
28-
parametersFormat: "table",
29-
propertiesFormat: "table",
30-
enumMembersFormat: "table",
31-
typeDeclarationFormat: "table",
32-
indexFormat: "table",
33-
expandParameters: true,
34-
name: "Lavalink Client",
35-
},
36-
pagination: true,
37-
}),
38-
],
39-
sidebar: [
40-
{
41-
label: "Getting Started",
42-
collapsed: true,
43-
items: [
44-
{
45-
label: "installation",
46-
link: "/home/installation",
47-
},
48-
{
49-
label: "Setup Lavalink-Server",
50-
link: "/home/setup-lavalink",
51-
},
52-
{
53-
label: "Features",
54-
link: "/home/features",
55-
},
56-
{
57-
label: "Example Guides",
58-
link: "/home/example",
59-
},
60-
{
61-
label: "Sample Configuration",
62-
link: "/home/configuration",
63-
},
17+
},
18+
editLink: {
19+
baseUrl: "https://github.com/Tomato6966/lavalink-client/tree/main",
20+
},
21+
plugins: [
22+
// Generate the documentation.
23+
starlightTypeDoc({
24+
entryPoints: ["../src/structures/**/*.ts"],
25+
tsconfig: "../tsconfig.json",
26+
typeDoc: {
27+
useCodeBlocks: true,
28+
parametersFormat: "table",
29+
propertiesFormat: "table",
30+
enumMembersFormat: "table",
31+
typeDeclarationFormat: "table",
32+
indexFormat: "table",
33+
expandParameters: true,
34+
name: "Lavalink Client",
35+
},
36+
pagination: true,
37+
}),
38+
],
39+
sidebar: [
40+
{
41+
label: "Getting Started",
42+
collapsed: true,
43+
items: [
44+
{
45+
label: "installation",
46+
link: "/home/installation",
47+
},
48+
{
49+
label: "Setup Lavalink-Server",
50+
link: "/home/setup-lavalink",
51+
},
52+
{
53+
label: "Features",
54+
link: "/home/features",
55+
},
56+
{
57+
label: "Example Guides",
58+
link: "/home/example",
59+
},
60+
{
61+
label: "Sample Configuration",
62+
link: "/home/configuration",
63+
},
6464
{
6565
label: "Checkout Docs (Manager-Class)",
6666
link: "/api/lavalinkmanager/classes/lavalinkmanager"
6767
},
68-
],
69-
},
70-
{
71-
label: "Extra",
72-
collapsed: true,
73-
items: [
74-
{
75-
label: "Manager Events",
76-
link: "/extra/manager-events",
77-
},
78-
{
79-
label: "Node Events",
80-
link: "/extra/node-events",
81-
},
82-
{
83-
label: "Resuming",
84-
link: "/extra/resuming",
85-
},
86-
{
87-
label: "Version-Update-Log",
88-
link: "/extra/version-log",
89-
}
90-
]
91-
},
92-
typeDocSidebarGroup,
93-
{
94-
label: "GitHub",
95-
link: "https://github.com/Tomato6966/lavalink-client",
96-
},
97-
{
98-
label: "NPM",
99-
link: "https://npmjs.com/lavalink-client",
100-
},
101-
{
102-
label: "Example Bot",
103-
link: "https://github.com/Tomato6966/lavalink-client/tree/main/testBot",
104-
},
68+
],
69+
},
70+
{
71+
label: "Extra",
72+
collapsed: true,
73+
items: [
74+
{
75+
label: "Manager Events",
76+
link: "/extra/manager-events",
77+
},
78+
{
79+
label: "Node Events",
80+
link: "/extra/node-events",
81+
},
82+
{
83+
label: "Resuming",
84+
link: "/extra/resuming",
85+
},
86+
{
87+
label: "Version-Update-Log",
88+
link: "/extra/version-log",
89+
}
90+
]
91+
},
92+
typeDocSidebarGroup,
93+
{
94+
label: "GitHub",
95+
link: "https://github.com/Tomato6966/lavalink-client",
96+
},
97+
{
98+
label: "NPM",
99+
link: "https://npmjs.com/lavalink-client",
100+
},
101+
{
102+
label: "Example Bot",
103+
link: "https://github.com/Tomato6966/lavalink-client/tree/main/testBot",
104+
},
105105
{
106106
label: "Official Lavalink-Discord",
107107
link: "https://discord.gg/lavalink-1082302532421943407"
@@ -110,7 +110,7 @@ export default defineConfig({
110110
label: "Official Lavalink-Web",
111111
link: "https://lavalink.dev"
112112
}
113-
],
114-
}),
115-
],
113+
],
114+
}),
115+
],
116116
});

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lavalink-client",
3-
"version": "2.4.4",
3+
"version": "2.4.5",
44
"description": "Easy, flexible and feature-rich lavalink@v4 Client. Both for Beginners and Proficients.",
55
"main": "dist/cjs/index.js",
66
"module": "dist/esm/index.js",
@@ -58,22 +58,22 @@
5858
},
5959
"homepage": "https://tomato6966.github.io/lavalink-client/",
6060
"devDependencies": {
61-
"@eslint/eslintrc": "^3.1.0",
62-
"@eslint/js": "^9.11.0",
63-
"@types/node": "^22.5.5",
64-
"@types/ws": "^8.5.12",
65-
"@typescript-eslint/eslint-plugin": "^8.6.0",
66-
"@typescript-eslint/parser": "^8.6.0",
67-
"eslint": "^9.11.0",
61+
"@eslint/eslintrc": "^3.2.0",
62+
"@eslint/js": "^9.18.0",
63+
"@types/node": "^22.10.5",
64+
"@types/ws": "^8.5.13",
65+
"@typescript-eslint/eslint-plugin": "^8.20.0",
66+
"@typescript-eslint/parser": "^8.20.0",
67+
"eslint": "^9.18.0",
6868
"tsc-alias": "^1.8.10",
69-
"typescript": "^5.6.2"
69+
"typescript": "^5.7.3"
7070
},
7171
"dependencies": {
72-
"tslib": "^2.7.0",
72+
"tslib": "^2.8.1",
7373
"ws": "^8.18.0"
7474
},
7575
"engines": {
7676
"node": ">=18.0.0",
77-
"bun": ">=1.0.0"
77+
"bun": ">=1.1.27"
7878
}
7979
}

src/structures/Constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export enum DestroyReasons {
6464
ChannelDeleted = "ChannelDeleted",
6565
DisconnectAllNodes = "DisconnectAllNodes",
6666
ReconnectAllNodes = "ReconnectAllNodes",
67-
6867
TrackErrorMaxTracksErroredPerTime = "TrackErrorMaxTracksErroredPerTime",
6968
TrackStuckMaxTracksErroredPerTime = "TrackStuckMaxTracksErroredPerTime",
7069
};

src/structures/LavalinkManager.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ export class LavalinkManager extends EventEmitter {
508508
if ("token" in update) {
509509
if (!player.node?.sessionId) throw new Error("Lavalink Node is either not ready or not up to date");
510510
const sessionId2Use = player.voice?.sessionId || ("sessionId" in update ? update.sessionId as string : undefined);
511-
if(!sessionId2Use) {
511+
if (!sessionId2Use) {
512512
this.emit("debug", DebugEvents.NoAudioDebug, {
513513
state: "error",
514514
message: `Can't send updatePlayer for voice token session - Missing sessionId :: ${JSON.stringify({ voice: { token: update.token, endpoint: update.endpoint, sessionId: sessionId2Use, }, update, playerVoice: player.voice }, null, 2)}`,
@@ -540,7 +540,7 @@ export class LavalinkManager extends EventEmitter {
540540

541541
/* voice state update */
542542
if (update.user_id !== this.options?.client.id) {
543-
if(update.user_id && player.voiceChannelId) {
543+
if (update.user_id && player.voiceChannelId) {
544544
this.emit(update.channel_id === player.voiceChannelId ? "playerVoiceJoin" : "playerVoiceLeave", player, update.user_id);
545545
}
546546

@@ -561,7 +561,7 @@ export class LavalinkManager extends EventEmitter {
561561

562562
player.voice.sessionId = update.session_id || player.voice.sessionId;
563563

564-
if(!player.voice.sessionId) {
564+
if (!player.voice.sessionId) {
565565
if (this.options?.advancedOptions?.enableDebugEvents) {
566566
this.emit("debug", DebugEvents.NoAudioDebug, {
567567
state: "warn",
@@ -586,9 +586,9 @@ export class LavalinkManager extends EventEmitter {
586586
player.voiceState.serverMute = update.mute ?? player.voiceState?.serverMute;
587587
player.voiceState.suppress = update.suppress ?? player.voiceState?.suppress;
588588

589-
if(selfMuteChanged || serverMuteChanged) this.emit("playerMuteChange", player, player.voiceState.selfMute, player.voiceState.serverMute);
590-
if(selfDeafChanged || serverDeafChanged) this.emit("playerDeafChange", player, player.voiceState.selfDeaf, player.voiceState.serverDeaf);
591-
if(suppressChange) this.emit("playerSuppressChange", player, player.voiceState.suppress);
589+
if (selfMuteChanged || serverMuteChanged) this.emit("playerMuteChange", player, player.voiceState.selfMute, player.voiceState.serverMute);
590+
if (selfDeafChanged || serverDeafChanged) this.emit("playerDeafChange", player, player.voiceState.selfDeaf, player.voiceState.serverDeaf);
591+
if (suppressChange) this.emit("playerSuppressChange", player, player.voiceState.suppress);
592592

593593
} else {
594594

@@ -616,15 +616,15 @@ export class LavalinkManager extends EventEmitter {
616616
}
617617

618618
// connect if there are tracks & autoReconnectOnlyWithTracks = true or autoReconnectOnlyWithTracks is false
619-
if(!autoReconnectOnlyWithTracks || (autoReconnectOnlyWithTracks && (player.queue.current || player.queue.tracks.length))) {
619+
if (!autoReconnectOnlyWithTracks || (autoReconnectOnlyWithTracks && (player.queue.current || player.queue.tracks.length))) {
620620
await player.connect();
621621
}
622622
// replay the current playing stream
623-
if(player.queue.current) {
623+
if (player.queue.current) {
624624
return void await player.play({ position: previousPosition, paused: previousPaused, clientTrack: player.queue.current, });
625625
}
626626
// try to play the next track
627-
if(player.queue.tracks.length) {
627+
if (player.queue.tracks.length) {
628628
return void await player.play({ paused: previousPaused });
629629
}
630630
// debug log if nothing was possible

0 commit comments

Comments
 (0)