lavalink-client 2.5.6 → 2.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +9 -2
  2. package/dist/index.d.mts +3036 -0
  3. package/dist/index.d.ts +3036 -0
  4. package/dist/index.js +4965 -0
  5. package/dist/index.mjs +4904 -0
  6. package/package.json +22 -25
  7. package/dist/cjs/index.d.ts +0 -16
  8. package/dist/cjs/index.js +0 -19
  9. package/dist/cjs/package.json +0 -3
  10. package/dist/cjs/structures/Constants.d.ts +0 -90
  11. package/dist/cjs/structures/Constants.js +0 -296
  12. package/dist/cjs/structures/CustomSearches/BandCampSearch.d.ts +0 -3
  13. package/dist/cjs/structures/CustomSearches/BandCampSearch.js +0 -39
  14. package/dist/cjs/structures/Filters.d.ts +0 -169
  15. package/dist/cjs/structures/Filters.js +0 -700
  16. package/dist/cjs/structures/LavalinkManager.d.ts +0 -232
  17. package/dist/cjs/structures/LavalinkManager.js +0 -621
  18. package/dist/cjs/structures/LavalinkManagerStatics.d.ts +0 -15
  19. package/dist/cjs/structures/LavalinkManagerStatics.js +0 -149
  20. package/dist/cjs/structures/Node.d.ts +0 -523
  21. package/dist/cjs/structures/Node.js +0 -1605
  22. package/dist/cjs/structures/NodeManager.d.ts +0 -100
  23. package/dist/cjs/structures/NodeManager.js +0 -224
  24. package/dist/cjs/structures/Player.d.ts +0 -223
  25. package/dist/cjs/structures/Player.js +0 -807
  26. package/dist/cjs/structures/Queue.d.ts +0 -186
  27. package/dist/cjs/structures/Queue.js +0 -390
  28. package/dist/cjs/structures/Types/Filters.d.ts +0 -190
  29. package/dist/cjs/structures/Types/Filters.js +0 -2
  30. package/dist/cjs/structures/Types/Manager.d.ts +0 -271
  31. package/dist/cjs/structures/Types/Manager.js +0 -2
  32. package/dist/cjs/structures/Types/Node.d.ts +0 -238
  33. package/dist/cjs/structures/Types/Node.js +0 -2
  34. package/dist/cjs/structures/Types/Player.d.ts +0 -114
  35. package/dist/cjs/structures/Types/Player.js +0 -2
  36. package/dist/cjs/structures/Types/Queue.d.ts +0 -34
  37. package/dist/cjs/structures/Types/Queue.js +0 -2
  38. package/dist/cjs/structures/Types/Track.d.ts +0 -134
  39. package/dist/cjs/structures/Types/Track.js +0 -2
  40. package/dist/cjs/structures/Types/Utils.d.ts +0 -440
  41. package/dist/cjs/structures/Types/Utils.js +0 -2
  42. package/dist/cjs/structures/Utils.d.ts +0 -116
  43. package/dist/cjs/structures/Utils.js +0 -567
  44. package/dist/esm/index.d.ts +0 -16
  45. package/dist/esm/index.js +0 -16
  46. package/dist/esm/package.json +0 -3
  47. package/dist/esm/structures/Constants.d.ts +0 -90
  48. package/dist/esm/structures/Constants.js +0 -293
  49. package/dist/esm/structures/CustomSearches/BandCampSearch.d.ts +0 -3
  50. package/dist/esm/structures/CustomSearches/BandCampSearch.js +0 -35
  51. package/dist/esm/structures/Filters.d.ts +0 -169
  52. package/dist/esm/structures/Filters.js +0 -696
  53. package/dist/esm/structures/LavalinkManager.d.ts +0 -232
  54. package/dist/esm/structures/LavalinkManager.js +0 -617
  55. package/dist/esm/structures/LavalinkManagerStatics.d.ts +0 -15
  56. package/dist/esm/structures/LavalinkManagerStatics.js +0 -146
  57. package/dist/esm/structures/Node.d.ts +0 -523
  58. package/dist/esm/structures/Node.js +0 -1600
  59. package/dist/esm/structures/NodeManager.d.ts +0 -100
  60. package/dist/esm/structures/NodeManager.js +0 -220
  61. package/dist/esm/structures/Player.d.ts +0 -223
  62. package/dist/esm/structures/Player.js +0 -803
  63. package/dist/esm/structures/Queue.d.ts +0 -186
  64. package/dist/esm/structures/Queue.js +0 -384
  65. package/dist/esm/structures/Types/Filters.d.ts +0 -190
  66. package/dist/esm/structures/Types/Filters.js +0 -1
  67. package/dist/esm/structures/Types/Manager.d.ts +0 -271
  68. package/dist/esm/structures/Types/Manager.js +0 -1
  69. package/dist/esm/structures/Types/Node.d.ts +0 -238
  70. package/dist/esm/structures/Types/Node.js +0 -1
  71. package/dist/esm/structures/Types/Player.d.ts +0 -114
  72. package/dist/esm/structures/Types/Player.js +0 -1
  73. package/dist/esm/structures/Types/Queue.d.ts +0 -34
  74. package/dist/esm/structures/Types/Queue.js +0 -1
  75. package/dist/esm/structures/Types/Track.d.ts +0 -134
  76. package/dist/esm/structures/Types/Track.js +0 -1
  77. package/dist/esm/structures/Types/Utils.d.ts +0 -440
  78. package/dist/esm/structures/Types/Utils.js +0 -1
  79. package/dist/esm/structures/Utils.d.ts +0 -116
  80. package/dist/esm/structures/Utils.js +0 -559
  81. package/dist/types/index.d.ts +0 -16
  82. package/dist/types/structures/Constants.d.ts +0 -90
  83. package/dist/types/structures/CustomSearches/BandCampSearch.d.ts +0 -3
  84. package/dist/types/structures/Filters.d.ts +0 -169
  85. package/dist/types/structures/LavalinkManager.d.ts +0 -232
  86. package/dist/types/structures/LavalinkManagerStatics.d.ts +0 -15
  87. package/dist/types/structures/Node.d.ts +0 -523
  88. package/dist/types/structures/NodeManager.d.ts +0 -100
  89. package/dist/types/structures/Player.d.ts +0 -223
  90. package/dist/types/structures/Queue.d.ts +0 -186
  91. package/dist/types/structures/Types/Filters.d.ts +0 -190
  92. package/dist/types/structures/Types/Manager.d.ts +0 -271
  93. package/dist/types/structures/Types/Node.d.ts +0 -238
  94. package/dist/types/structures/Types/Player.d.ts +0 -114
  95. package/dist/types/structures/Types/Queue.d.ts +0 -34
  96. package/dist/types/structures/Types/Track.d.ts +0 -134
  97. package/dist/types/structures/Types/Utils.d.ts +0 -440
  98. package/dist/types/structures/Utils.d.ts +0 -116
@@ -1,190 +0,0 @@
1
- import type { FloatNumber, IntegerNumber } from "./Utils.js";
2
- /** The Audio Outputs type */
3
- export type AudioOutputs = "mono" | "stereo" | "left" | "right";
4
- /** The "active" / "disabled" Player Filters */
5
- export interface PlayerFilters {
6
- /** Sets nightcore to false, and vaporwave to false */
7
- custom: boolean;
8
- /** Sets custom to false, and vaporwave to false */
9
- nightcore: boolean;
10
- /** Sets custom to false, and nightcore to false */
11
- vaporwave: boolean;
12
- /** If rotation filter is enabled / not */
13
- rotation: boolean;
14
- /** if karaoke filter is enabled / not */
15
- karaoke: boolean;
16
- /** if tremolo filter is enabled / not */
17
- tremolo: boolean;
18
- /** if vibrato filter is enabled / not */
19
- vibrato: boolean;
20
- lowPass: boolean;
21
- /** audio Output (default stereo, mono sounds the fullest and best for not-stereo tracks) */
22
- audioOutput: AudioOutputs;
23
- /** Lavalink Volume FILTER (not player Volume, think of it as a gain booster) */
24
- volume: boolean;
25
- /** Filters for the Lavalink Filter Plugin */
26
- lavalinkFilterPlugin: {
27
- /** if echo filter is enabled / not */
28
- echo: boolean;
29
- /** if reverb filter is enabled / not */
30
- reverb: boolean;
31
- };
32
- lavalinkLavaDspxPlugin: {
33
- /** if lowPass filter is enabled / not */
34
- lowPass: boolean;
35
- /** if highPass filter is enabled / not */
36
- highPass: boolean;
37
- /** if normalization filter is enabled / not */
38
- normalization: boolean;
39
- /** if echo filter is enabled / not */
40
- echo: boolean;
41
- };
42
- }
43
- /**
44
- * There are 15 bands (0-14) that can be changed.
45
- * "gain" is the multiplier for the given band.
46
- * The default value is 0.
47
- * Valid values range from -0.25 to 1.0, where -0.25 means the given band is completely muted, and 0.25 means it is doubled.
48
- * Modifying the gain could also change the volume of the output.
49
- */
50
- export interface EQBand {
51
- /** On what band position (0-14) it should work */
52
- band: IntegerNumber | number;
53
- /** The gain (-0.25 to 1.0) */
54
- gain: FloatNumber | number;
55
- }
56
- /**
57
- * Uses equalization to eliminate part of a band, usually targeting vocals.
58
- */
59
- export interface KaraokeFilter {
60
- /** The level (0 to 1.0 where 0.0 is no effect and 1.0 is full effect) */
61
- level?: number;
62
- /** The mono level (0 to 1.0 where 0.0 is no effect and 1.0 is full effect) */
63
- monoLevel?: number;
64
- /** The filter band (in Hz) */
65
- filterBand?: number;
66
- /** The filter width */
67
- filterWidth?: number;
68
- }
69
- /**
70
- * Changes the speed, pitch, and rate
71
- */
72
- export interface TimescaleFilter {
73
- /** The playback speed 0.0 ≤ x */
74
- speed?: number;
75
- /** The pitch 0.0 ≤ x */
76
- pitch?: number;
77
- /** The rate 0.0 ≤ x */
78
- rate?: number;
79
- }
80
- /**
81
- * Uses amplification to create a shuddering effect, where the volume quickly oscillates.
82
- * Demo: https://en.wikipedia.org/wiki/File:Fuse_Electronics_Tremolo_MK-III_Quick_Demo.ogv
83
- */
84
- export interface TremoloFilter {
85
- /** The frequency 0.0 < x */
86
- frequency?: number;
87
- /** The tremolo depth 0.0 < x ≤ 1.0 */
88
- depth?: number;
89
- }
90
- /**
91
- * Similar to tremolo. While tremolo oscillates the volume, vibrato oscillates the pitch.
92
- */
93
- export interface VibratoFilter {
94
- /** The frequency 0.0 < x ≤ 14.0 */
95
- frequency?: number;
96
- /** The vibrato depth 0.0 < x ≤ 1.0 */
97
- depth?: number;
98
- }
99
- /**
100
- * Rotates the sound around the stereo channels/user headphones (aka Audio Panning).
101
- * It can produce an effect similar to https://youtu.be/QB9EB8mTKcc (without the reverb).
102
- */
103
- export interface RotationFilter {
104
- /** The frequency of the audio rotating around the listener in Hz. 0.2 is similar to the example video above */
105
- rotationHz?: number;
106
- }
107
- /**
108
- * Distortion effect. It can generate some pretty unique audio effects.
109
- */
110
- export interface DistortionFilter {
111
- sinOffset?: number;
112
- sinScale?: number;
113
- cosOffset?: number;
114
- cosScale?: number;
115
- tanOffset?: number;
116
- tanScale?: number;
117
- offset?: number;
118
- scale?: number;
119
- }
120
- /**
121
- * Mixes both channels (left and right), with a configurable factor on how much each channel affects the other.
122
- * With the defaults, both channels are kept independent of each other.
123
- * Setting all factors to 0.5 means both channels get the same audio.
124
- */
125
- export interface ChannelMixFilter {
126
- /** The left to left channel mix factor (0.0 ≤ x ≤ 1.0) */
127
- leftToLeft?: number;
128
- /** The left to right channel mix factor (0.0 ≤ x ≤ 1.0) */
129
- leftToRight?: number;
130
- /** The right to left channel mix factor (0.0 ≤ x ≤ 1.0) */
131
- rightToLeft?: number;
132
- /** The right to right channel mix factor (0.0 ≤ x ≤ 1.0) */
133
- rightToRight?: number;
134
- }
135
- /**
136
- * Higher frequencies get suppressed, while lower frequencies pass through this filter, thus the name low pass.
137
- * Any smoothing values equal to or less than 1.0 will disable the filter.
138
- */
139
- export interface LowPassFilter {
140
- /** The smoothing factor (1.0 < x) */
141
- smoothing?: number;
142
- }
143
- /**
144
- * Filter Data stored in the Client and partially sent to Lavalink
145
- */
146
- export interface FilterData {
147
- volume?: number;
148
- karaoke?: KaraokeFilter;
149
- timescale?: TimescaleFilter;
150
- tremolo?: TremoloFilter;
151
- vibrato?: VibratoFilter;
152
- rotation?: RotationFilter;
153
- distortion?: DistortionFilter;
154
- channelMix?: ChannelMixFilter;
155
- lowPass?: LowPassFilter;
156
- pluginFilters?: {
157
- "lavalink-filter-plugin"?: {
158
- "echo"?: {
159
- delay?: number;
160
- decay?: number;
161
- };
162
- "reverb"?: {
163
- delays?: number[];
164
- gains?: number[];
165
- };
166
- };
167
- "high-pass"?: {
168
- cutoffFrequency?: number;
169
- boostFactor?: number;
170
- };
171
- "low-pass"?: {
172
- cutoffFrequency?: number;
173
- boostFactor?: number;
174
- };
175
- normalization?: {
176
- maxAmplitude?: number;
177
- adaptive?: boolean;
178
- };
179
- echo?: {
180
- echoLength?: number;
181
- decay?: number;
182
- };
183
- };
184
- }
185
- /**
186
- * Actual Filter Data sent to Lavalink
187
- */
188
- export interface LavalinkFilterData extends FilterData {
189
- equalizer?: EQBand[];
190
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,271 +0,0 @@
1
- import type { DebugEvents } from "../Constants.js";
2
- import type { Player } from "../Player.js";
3
- import type { LavalinkNodeOptions } from "./Node.js";
4
- import type { DestroyReasonsType, PlayerJson } from "./Player.js";
5
- import type { ManagerQueueOptions } from "./Queue.js";
6
- import type { Track, UnresolvedTrack } from "./Track.js";
7
- import type { GuildShardPayload, SearchPlatform, SponsorBlockChaptersLoaded, SponsorBlockChapterStarted, SponsorBlockSegmentSkipped, SponsorBlockSegmentsLoaded, TrackExceptionEvent, TrackEndEvent, TrackStuckEvent, WebSocketClosedEvent, TrackStartEvent, LyricsFoundEvent, LyricsNotFoundEvent, LyricsLineEvent } from "./Utils.js";
8
- /**
9
- * The events from the lavalink Manager
10
- */
11
- export interface LavalinkManagerEvents {
12
- /**
13
- * Emitted when a Track started playing.
14
- * @event Manager#trackStart
15
- */
16
- "trackStart": (player: Player, track: Track | null, payload: TrackStartEvent) => void;
17
- /**
18
- * Emitted when a Track finished.
19
- * @event Manager#trackEnd
20
- */
21
- "trackEnd": (player: Player, track: Track | null, payload: TrackEndEvent) => void;
22
- /**
23
- * Emitted when a Track got stuck while playing.
24
- * @event Manager#trackStuck
25
- */
26
- "trackStuck": (player: Player, track: Track | null, payload: TrackStuckEvent) => void;
27
- /**
28
- * Emitted when a Track errored.
29
- * @event Manager#trackError
30
- */
31
- "trackError": (player: Player, track: Track | UnresolvedTrack | null, payload: TrackExceptionEvent) => void;
32
- /**
33
- * Emitted when the Playing finished and no more tracks in the queue.
34
- * @event Manager#queueEnd
35
- */
36
- "queueEnd": (player: Player, track: Track | UnresolvedTrack | null, payload: TrackEndEvent | TrackStuckEvent | TrackExceptionEvent) => void;
37
- /**
38
- * Emitted when a Player is created.
39
- * @event Manager#playerCreate
40
- */
41
- "playerCreate": (player: Player) => void;
42
- /**
43
- * Emitted when a Player is moved within the channel.
44
- * @event Manager#playerMove
45
- */
46
- "playerMove": (player: Player, oldVoiceChannelId: string, newVoiceChannelId: string) => void;
47
- /**
48
- * Emitted when a Player is disconnected from a channel.
49
- * @event Manager#playerDisconnect
50
- */
51
- "playerDisconnect": (player: Player, voiceChannelId: string) => void;
52
- /**
53
- * Emitted when a Node-Socket got closed for a specific Player.
54
- * Usually emits when the audio websocket to discord is closed, This can happen for various reasons (normal and abnormal), e.g. when using an expired voice server update. 4xxx codes are usually bad.
55
- *
56
- * So this is just information, normally lavalink should handle disconnections
57
- *
58
- * Discord Docs:
59
- * @link https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes
60
- *
61
- * Lavalink Docs:
62
- * @link https://lavalink.dev/api/websocket.html#websocketclosedevent
63
- * @event Manager#playerSocketClosed
64
- */
65
- "playerSocketClosed": (player: Player, payload: WebSocketClosedEvent) => void;
66
- /**
67
- * Emitted when a Player get's destroyed
68
- * @event Manager#playerDestroy
69
- */
70
- "playerDestroy": (player: Player, destroyReason?: DestroyReasonsType) => void;
71
- /**
72
- * Always emits when the player (on lavalink side) got updated
73
- * @event Manager#playerUpdate
74
- */
75
- "playerUpdate": (oldPlayerJson: PlayerJson, newPlayer: Player) => void;
76
- /**
77
- * Emitted when the player's selfMuted or serverMuted state changed (true -> false | false -> true)
78
- * @event Manager#playerMuteChange
79
- */
80
- "playerMuteChange": (player: Player, selfMuted: boolean, serverMuted: boolean) => void;
81
- /**
82
- * Emitted when the player's selfDeafed or serverDeafed state changed (true -> false | false -> true)
83
- * @event Manager#playerDeafChange
84
- */
85
- "playerDeafChange": (player: Player, selfDeafed: boolean, serverDeafed: boolean) => void;
86
- /**
87
- * Emitted when the player's suppressed (true -> false | false -> true)
88
- * @event Manager#playerSuppressChange
89
- */
90
- "playerSuppressChange": (player: Player, suppress: boolean) => void;
91
- /**
92
- * Emitted when the player's queue got empty, and the timeout started
93
- * @event Manager#playerQueueEmptyStart
94
- */
95
- "playerQueueEmptyStart": (player: Player, timeoutMs: number) => void;
96
- /**
97
- * Emitted when the player's queue got empty, and the timeout finished leading to destroying the player
98
- * @event Manager#playerQueueEmptyEnd
99
- */
100
- "playerQueueEmptyEnd": (player: Player) => void;
101
- /**
102
- * Emitted when the player's queue got empty, and the timeout got cancelled becuase a track got re-added to it.
103
- * @event Manager#playerQueueEmptyEnd
104
- */
105
- "playerQueueEmptyCancel": (player: Player) => void;
106
- /**
107
- * Emitted, when a user joins the voice channel, while there is a player existing
108
- * @event Manager#playerQueueEmptyStart
109
- */
110
- "playerVoiceJoin": (player: Player, userId: string) => void;
111
- /**
112
- * Emitted, when a user leaves the voice channel, while there is a player existing
113
- * @event Manager#playerQueueEmptyEnd
114
- */
115
- "playerVoiceLeave": (player: Player, userId: string) => void;
116
- /**
117
- * SPONSORBLOCK-PLUGIN EVENT
118
- * Emitted when Segments are loaded
119
- * @link https://github.com/topi314/Sponsorblock-Plugin#segmentsloaded
120
- * @event Manager#trackError
121
- */
122
- "SegmentsLoaded": (player: Player, track: Track | UnresolvedTrack | null, payload: SponsorBlockSegmentsLoaded) => void;
123
- /**
124
- * SPONSORBLOCK-PLUGIN EVENT
125
- * Emitted when a specific Segment was skipped
126
- * @link https://github.com/topi314/Sponsorblock-Plugin#segmentskipped
127
- * @event Manager#trackError
128
- */
129
- "SegmentSkipped": (player: Player, track: Track | UnresolvedTrack | null, payload: SponsorBlockSegmentSkipped) => void;
130
- /**
131
- * SPONSORBLOCK-PLUGIN EVENT
132
- * Emitted when a specific Chapter starts playing
133
- * @link https://github.com/topi314/Sponsorblock-Plugin#chapterstarted
134
- * @event Manager#trackError
135
- */
136
- "ChapterStarted": (player: Player, track: Track | UnresolvedTrack | null, payload: SponsorBlockChapterStarted) => void;
137
- /**
138
- * SPONSORBLOCK-PLUGIN EVENT
139
- * Emitted when Chapters are loaded
140
- * @link https://github.com/topi314/Sponsorblock-Plugin#chaptersloaded
141
- * @event Manager#trackError
142
- */
143
- "ChaptersLoaded": (player: Player, track: Track | UnresolvedTrack | null, payload: SponsorBlockChaptersLoaded) => void;
144
- /**
145
- * Lavalink-Client Debug Event
146
- * Emitted for several erros, and logs within lavalink-client, if managerOptions.advancedOptions.enableDebugEvents is true
147
- * Useful for debugging the lavalink-client
148
- *
149
- * @event Manager#debug
150
- */
151
- "debug": (eventKey: DebugEvents, eventData: {
152
- message: string;
153
- state: "log" | "warn" | "error";
154
- error?: Error | string;
155
- functionLayer: string;
156
- }) => void;
157
- /**
158
- * Emitted when a Lyrics line is received
159
- * @link https://github.com/topi314/LavaLyrics
160
- * @event Manager#LyricsLine
161
- */
162
- "LyricsLine": (player: Player, track: Track | UnresolvedTrack | null, payload: LyricsLineEvent) => void;
163
- /**
164
- * Emitted when a Lyrics is found
165
- * @link https://github.com/topi314/LavaLyrics
166
- * @event Manager#LyricsFound
167
- */
168
- "LyricsFound": (player: Player, track: Track | UnresolvedTrack | null, payload: LyricsFoundEvent) => void;
169
- /**
170
- * Emitted when a Lyrics is not found
171
- * @link https://github.com/topi314/LavaLyrics
172
- * @event Manager#LyricsNotFound
173
- */
174
- "LyricsNotFound": (player: Player, track: Track | UnresolvedTrack | null, payload: LyricsNotFoundEvent) => void;
175
- "playerResumed": (player: Player, track: Track | UnresolvedTrack | null) => void;
176
- "playerPaused": (player: Player, track: Track | UnresolvedTrack | null) => void;
177
- }
178
- /**
179
- * The Bot client Options needed for the manager
180
- */
181
- export interface BotClientOptions {
182
- /** Bot Client Id */
183
- id: string;
184
- /** Bot Client Username */
185
- username?: string;
186
- /** So users can pass entire objects / classes */
187
- [x: string | number | symbol]: unknown;
188
- }
189
- /** Sub Manager Options, for player specific things */
190
- export interface ManagerPlayerOptions {
191
- /** If the Lavalink Volume should be decremented by x number */
192
- volumeDecrementer?: number;
193
- /** How often it should update the the player Position */
194
- clientBasedPositionUpdateInterval?: number;
195
- /** What should be used as a searchPlatform, if no source was provided during the query */
196
- defaultSearchPlatform?: SearchPlatform;
197
- /** Applies the volume via a filter, not via the lavalink volume transformer */
198
- applyVolumeAsFilter?: boolean;
199
- /** Transforms the saved data of a requested user */
200
- requesterTransformer?: (requester: unknown) => unknown;
201
- /** What lavalink-client should do when the player reconnects */
202
- onDisconnect?: {
203
- /** Try to reconnect? -> If fails -> Destroy */
204
- autoReconnect?: boolean;
205
- /** Only try to reconnect if there are tracks in the queue */
206
- autoReconnectOnlyWithTracks?: boolean;
207
- /** Instantly destroy player (overrides autoReconnect) | Don't provide == disable feature*/
208
- destroyPlayer?: boolean;
209
- };
210
- /** Minimum time to play the song before autoPlayFunction is executed (prevents error spamming) Set to 0 to disable it @default 10000 */
211
- minAutoPlayMs?: number;
212
- /** Allows you to declare how many tracks are allowed to error/stuck within a time-frame before player is destroyed @default "{threshold: 35000, maxAmount: 3 }" */
213
- maxErrorsPerTime?: {
214
- /** The threshold time to count errors (recommended is 35s) */
215
- threshold: number;
216
- /** The max amount of errors within the threshold time which are allowed before destroying the player (when errors > maxAmount -> player.destroy()) */
217
- maxAmount: number;
218
- };
219
- onEmptyQueue?: {
220
- /** Get's executed onEmptyQueue -> You can do any track queue previous transformations, if you add a track to the queue -> it will play it, if not queueEnd will execute! */
221
- autoPlayFunction?: (player: Player, lastPlayedTrack: Track) => Promise<void>;
222
- destroyAfterMs?: number;
223
- };
224
- useUnresolvedData?: boolean;
225
- }
226
- /** Manager Options used to create the manager */
227
- export interface ManagerOptions {
228
- /** The Node Options, for all Nodes! (on init) */
229
- nodes: LavalinkNodeOptions[];
230
- /** @async The Function to send the voice connection changes from Lavalink to Discord */
231
- sendToShard: (guildId: string, payload: GuildShardPayload) => void;
232
- /** The Bot Client's Data for Authorization */
233
- client?: BotClientOptions;
234
- /** QueueOptions for all Queues */
235
- queueOptions?: ManagerQueueOptions;
236
- /** PlayerOptions for all Players */
237
- playerOptions?: ManagerPlayerOptions;
238
- /** If it should skip to the next Track on TrackEnd / TrackError etc. events */
239
- autoSkip?: boolean;
240
- /** If it should skip to the next Track if track.resolve errors while trying to play a track. */
241
- autoSkipOnResolveError?: boolean;
242
- /** If it should emit only new (unique) songs and not when a looping track (or similar) is plaid, default false */
243
- emitNewSongsOnly?: boolean;
244
- /** Only allow link requests with links either matching some of that regExp or including some of that string */
245
- linksWhitelist?: (RegExp | string)[];
246
- /** Never allow link requests with links either matching some of that regExp or including some of that string (doesn't even allow if it's whitelisted) */
247
- linksBlacklist?: (RegExp | string)[];
248
- /** If links should be allowed or not. If set to false, it will throw an error if a link was provided. */
249
- linksAllowed?: boolean;
250
- /** Advanced Options for the Library, which may or may not be "library breaking" */
251
- advancedOptions?: {
252
- /** Max duration for that the filter fix duration works (in ms) - default is 8mins */
253
- maxFilterFixDuration?: number;
254
- /** Enable Debug event */
255
- enableDebugEvents?: boolean;
256
- /** optional */
257
- debugOptions?: {
258
- /** For logging custom searches */
259
- logCustomSearches?: boolean;
260
- /** logs for debugging the "no-Audio" playing error */
261
- noAudio?: boolean;
262
- /** For Logging the Destroy function */
263
- playerDestroy?: {
264
- /** To show the debug reason at all times. */
265
- debugLog?: boolean;
266
- /** If you get 'Error: Use Player#destroy("reason") not LavalinkManager#deletePlayer() to stop the Player' put it on true */
267
- dontThrowError?: boolean;
268
- };
269
- };
270
- };
271
- }
@@ -1 +0,0 @@
1
- export {};