lavalink-client 2.9.10 → 2.10.0
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.
- package/README.md +17 -3
- package/dist/index.cjs +178 -115
- package/dist/index.d.cts +59 -48
- package/dist/index.d.ts +59 -48
- package/dist/index.js +177 -115
- package/dist/index.mjs +177 -115
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -410,7 +410,7 @@ declare const NodeSymbol: unique symbol;
|
|
|
410
410
|
*/
|
|
411
411
|
declare function parseLavalinkConnUrl(connectionUrl: string): {
|
|
412
412
|
authorization: string;
|
|
413
|
-
nodeType:
|
|
413
|
+
nodeType: NodeType;
|
|
414
414
|
id: string;
|
|
415
415
|
host: string;
|
|
416
416
|
port: number;
|
|
@@ -1537,7 +1537,7 @@ type SponsorBlockSegment = "sponsor" | "selfpromo" | "interaction" | "intro" | "
|
|
|
1537
1537
|
*/
|
|
1538
1538
|
interface LavalinkNodeOptions {
|
|
1539
1539
|
/** Specify the Node-Type of this node. Default: Lavalink */
|
|
1540
|
-
nodeType?:
|
|
1540
|
+
nodeType?: NodeType;
|
|
1541
1541
|
/** The Lavalink Server-Ip / Domain-URL */
|
|
1542
1542
|
host: string;
|
|
1543
1543
|
/** The Lavalink Connection Port */
|
|
@@ -1832,7 +1832,10 @@ declare enum ReconnectionState {
|
|
|
1832
1832
|
PENDING = "PENDING",
|
|
1833
1833
|
DESTROYING = "DESTROYING"
|
|
1834
1834
|
}
|
|
1835
|
-
|
|
1835
|
+
declare enum NodeType {
|
|
1836
|
+
Lavalink = "Lavalink",
|
|
1837
|
+
NodeLink = "NodeLink"
|
|
1838
|
+
}
|
|
1836
1839
|
|
|
1837
1840
|
declare class FilterManager {
|
|
1838
1841
|
static EQList: {
|
|
@@ -2891,7 +2894,7 @@ declare class Player {
|
|
|
2891
2894
|
}
|
|
2892
2895
|
|
|
2893
2896
|
declare class NodeLinkNode extends LavalinkNode {
|
|
2894
|
-
nodeType:
|
|
2897
|
+
nodeType: NodeType;
|
|
2895
2898
|
constructor(options: LavalinkNodeOptions, manager: NodeManager);
|
|
2896
2899
|
/**
|
|
2897
2900
|
* Uses the gapless feature to set the next track to be played.
|
|
@@ -2899,6 +2902,12 @@ declare class NodeLinkNode extends LavalinkNode {
|
|
|
2899
2902
|
* @param track if no track provided, it will use the next track from queue
|
|
2900
2903
|
*/
|
|
2901
2904
|
setNextTrackGapLess(player: Player, track?: Track | UnresolvedTrack): Promise<boolean>;
|
|
2905
|
+
/**
|
|
2906
|
+
* Removes the nextTrackGapLess configuration
|
|
2907
|
+
* @param player current player
|
|
2908
|
+
* @param track if no track provided, it will use the next track from queue
|
|
2909
|
+
*/
|
|
2910
|
+
removeNextTrackGapLess(player: Player): Promise<boolean>;
|
|
2902
2911
|
/**
|
|
2903
2912
|
* Retrieves the meaning of a track.
|
|
2904
2913
|
* @param track
|
|
@@ -3058,7 +3067,7 @@ declare class LavalinkNode {
|
|
|
3058
3067
|
private heartBeatPongTimestamp;
|
|
3059
3068
|
private heartBeatInterval?;
|
|
3060
3069
|
private pingTimeout?;
|
|
3061
|
-
nodeType:
|
|
3070
|
+
nodeType: NodeType;
|
|
3062
3071
|
isAlive: boolean;
|
|
3063
3072
|
static _NodeLinkClass: unknown;
|
|
3064
3073
|
/** The provided Options of the Node */
|
|
@@ -3743,13 +3752,13 @@ declare class NodeManager extends EventEmitter {
|
|
|
3743
3752
|
* @param options The options for the node
|
|
3744
3753
|
* @returns The node that was created
|
|
3745
3754
|
*/
|
|
3746
|
-
createNode<T extends LavalinkNode | NodeLinkNode>(options: LavalinkNodeOptions): T;
|
|
3755
|
+
createNode<T extends LavalinkNode | NodeLinkNode>(options: LavalinkNodeOptions | NodeLinkNode | LavalinkNode): T;
|
|
3747
3756
|
/**
|
|
3748
3757
|
* Get the nodes sorted for the least usage, by a sorttype
|
|
3749
3758
|
* @param sortType The type of sorting to use
|
|
3750
3759
|
* @returns
|
|
3751
3760
|
*/
|
|
3752
|
-
leastUsedNodes(sortType?: "memory" | "cpuLavalink" | "cpuSystem" | "calls" | "playingPlayers" | "players"): LavalinkNode[];
|
|
3761
|
+
leastUsedNodes(sortType?: "memory" | "cpuLavalink" | "cpuSystem" | "calls" | "playingPlayers" | "players", filterForNodeTypes?: (NodeType | NodeLinkNode | LavalinkNode)[]): LavalinkNode[];
|
|
3753
3762
|
/**
|
|
3754
3763
|
* Delete a node from the nodeManager and destroy it
|
|
3755
3764
|
* @param node The node to delete
|
|
@@ -3769,10 +3778,10 @@ declare class NodeManager extends EventEmitter {
|
|
|
3769
3778
|
deleteNode(node: LavalinkNodeIdentifier | LavalinkNode | NodeLinkNode, movePlayers?: boolean): void;
|
|
3770
3779
|
/**
|
|
3771
3780
|
* Get a node from the nodeManager
|
|
3772
|
-
* @param node The node to get
|
|
3781
|
+
* @param node The node to get either by idetnifier, by class or by enum
|
|
3773
3782
|
* @returns The node that was retrieved
|
|
3774
3783
|
*/
|
|
3775
|
-
getNode(node: LavalinkNodeIdentifier | LavalinkNode | NodeLinkNode): LavalinkNode | NodeLinkNode | undefined;
|
|
3784
|
+
getNode(node: LavalinkNodeIdentifier | LavalinkNode | NodeLinkNode | NodeType): LavalinkNode | NodeLinkNode | undefined;
|
|
3776
3785
|
}
|
|
3777
3786
|
|
|
3778
3787
|
/**
|
|
@@ -4032,7 +4041,7 @@ type PlayerConstructor<T extends Player = Player> = new (options: PlayerOptions,
|
|
|
4032
4041
|
/** Manager Options used to create the manager */
|
|
4033
4042
|
interface ManagerOptions<CustomPlayerT extends Player = Player> {
|
|
4034
4043
|
/** The Node Options, for all Nodes! (on init) */
|
|
4035
|
-
nodes: LavalinkNodeOptions[];
|
|
4044
|
+
nodes: (LavalinkNodeOptions | NodeLinkNode | LavalinkNode)[];
|
|
4036
4045
|
/** @async The Function to send the voice connection changes from Lavalink to Discord */
|
|
4037
4046
|
sendToShard: (guildId: string, payload: GuildShardPayload) => void;
|
|
4038
4047
|
/** The Bot Client's Data for Authorization */
|
|
@@ -4163,48 +4172,50 @@ declare class LavalinkManager<CustomPlayerT extends Player = Player> extends Eve
|
|
|
4163
4172
|
* port: 2333,
|
|
4164
4173
|
* id: "testnode"
|
|
4165
4174
|
* },
|
|
4175
|
+
* // you can also use the util like this, and it will return a valid node option object. must start with: lavalink:// | nodelink://
|
|
4176
|
+
* // parseLavalinkConnUrl("nodelink://<nodeId>:<nodeAuthorization(Password)>@<NodeHost>:<NodePort>")
|
|
4166
4177
|
* sendToShard(guildId, payload) => client.guilds.cache.get(guildId)?.shard?.send(payload),
|
|
4167
|
-
*
|
|
4168
|
-
*
|
|
4169
|
-
*
|
|
4170
|
-
*
|
|
4171
|
-
*
|
|
4172
|
-
*
|
|
4173
|
-
*
|
|
4174
|
-
*
|
|
4175
|
-
*
|
|
4176
|
-
*
|
|
4177
|
-
*
|
|
4178
|
-
*
|
|
4179
|
-
*
|
|
4180
|
-
*
|
|
4181
|
-
*
|
|
4182
|
-
*
|
|
4183
|
-
*
|
|
4184
|
-
* onEmptyQueue: {
|
|
4185
|
-
* destroyAfterMs: 30_000,
|
|
4186
|
-
* //autoPlayFunction: YourAutoplayFunction,
|
|
4187
|
-
* },
|
|
4188
|
-
* useUnresolvedData: true
|
|
4178
|
+
* ],
|
|
4179
|
+
* client: {
|
|
4180
|
+
* id: process.env.CLIENT_ID,
|
|
4181
|
+
* username: "TESTBOT"
|
|
4182
|
+
* },
|
|
4183
|
+
* // optional Options:
|
|
4184
|
+
* autoSkip: true,
|
|
4185
|
+
* playerOptions: {
|
|
4186
|
+
* applyVolumeAsFilter: false,
|
|
4187
|
+
* clientBasedPositionUpdateInterval: 150,
|
|
4188
|
+
* defaultSearchPlatform: "ytmsearch",
|
|
4189
|
+
* allowCustomSources: false,
|
|
4190
|
+
* volumeDecrementer: 0.75,
|
|
4191
|
+
* //requesterTransformer: YourRequesterTransformerFunction,
|
|
4192
|
+
* onDisconnect: {
|
|
4193
|
+
* autoReconnect: true,
|
|
4194
|
+
* destroyPlayer: false
|
|
4189
4195
|
* },
|
|
4190
|
-
*
|
|
4191
|
-
*
|
|
4192
|
-
* //
|
|
4193
|
-
* //queueChangesWatcher: yourCustomQueueChangesWatcherClass
|
|
4196
|
+
* onEmptyQueue: {
|
|
4197
|
+
* destroyAfterMs: 30_000,
|
|
4198
|
+
* //autoPlayFunction: YourAutoplayFunction,
|
|
4194
4199
|
* },
|
|
4195
|
-
*
|
|
4196
|
-
*
|
|
4197
|
-
*
|
|
4198
|
-
*
|
|
4199
|
-
*
|
|
4200
|
-
*
|
|
4201
|
-
*
|
|
4202
|
-
*
|
|
4203
|
-
*
|
|
4204
|
-
*
|
|
4200
|
+
* useUnresolvedData: true
|
|
4201
|
+
* },
|
|
4202
|
+
* queueOptions: {
|
|
4203
|
+
* maxPreviousTracks: 25,
|
|
4204
|
+
* //queueStore: yourCustomQueueStoreManagerClass,
|
|
4205
|
+
* //queueChangesWatcher: yourCustomQueueChangesWatcherClass
|
|
4206
|
+
* },
|
|
4207
|
+
* linksBlacklist: [],
|
|
4208
|
+
* linksWhitelist: [],
|
|
4209
|
+
* advancedOptions: {
|
|
4210
|
+
* maxFilterFixDuration: 600_000,
|
|
4211
|
+
* debugOptions: {
|
|
4212
|
+
* noAudio: false,
|
|
4213
|
+
* playerDestroy: {
|
|
4214
|
+
* dontThrowError: false,
|
|
4215
|
+
* debugLogs: false
|
|
4205
4216
|
* }
|
|
4206
4217
|
* }
|
|
4207
|
-
*
|
|
4218
|
+
* }
|
|
4208
4219
|
* })
|
|
4209
4220
|
* ```
|
|
4210
4221
|
*/
|
|
@@ -4333,4 +4344,4 @@ declare const LavalinkPlugins: {
|
|
|
4333
4344
|
/** Lavalink Sources regexes for url validations */
|
|
4334
4345
|
declare const SourceLinksRegexes: Record<SourcesRegex, RegExp>;
|
|
4335
4346
|
|
|
4336
|
-
export { type AudioOutputs, type Awaitable, type Base64, type BaseNodeStats, type BasePlayOptions, type BotClientOptions, type CPUStats, type ChannelDeletePacket, type ChannelMixFilter, type ClientCustomSearchPlatformUtils, type ClientSearchPlatform, DebugEvents, type DeepRequired, DefaultQueueStore, DefaultSources, DestroyReasons, type DestroyReasonsType, DisconnectReasons, type DisconnectReasonsType, type DistortionFilter, type DuncteSearchPlatform, type EQBand, EQList, type Exception, type FailingAddress, type FilterData, FilterManager, type FloatNumber, type FrameStats, type GitObject, type GuildShardPayload, type IntegerNumber, type InvalidLavalinkRestRequest, type JioSaavnSearchPlatform, type KaraokeFilter, type LavaSearchFilteredResponse, type LavaSearchQuery, type LavaSearchResponse, type LavaSearchType, type LavaSrcSearchPlatform, type LavaSrcSearchPlatformBase, type LavalinkClientSearchPlatform, type LavalinkClientSearchPlatformResolve, type LavalinkFilterData, type LavalinkInfo, LavalinkManager, type LavalinkManagerEvents, LavalinkNode, type LavalinkNodeIdentifier, type LavalinkNodeOptions, type LavalinkPlayOptions, type LavalinkPlayer, type LavalinkPlayerVoice, type LavalinkPlayerVoiceOptions, type LavalinkPlugin_JioSaavn_SourceNames, type LavalinkPlugin_LavaSrc_SourceNames, LavalinkPlugins, type LavalinkSearchPlatform, type LavalinkSourceNames, type LavalinkTrack, type LavalinkTrackInfo, type LoadTypes, type LowPassFilter, type LyricsEvent, type LyricsEventType, type LyricsFoundEvent, type LyricsLine, type LyricsLineEvent, type LyricsNotFoundEvent, type LyricsResult, type ManagerOptions, type ManagerPlayerOptions, type ManagerQueueOptions, ManagerUtils, type MemoryStats, MiniMap, type MiniMapConstructor, type ModifyRequest, type NodeLinkConnectionMetrics, NodeLinkExclusiveEvents, NodeLinkNode, type NodeLink_ChorusFilter, type NodeLink_CompressorFilter, type NodeLink_EchoFilter, type NodeLink_HighPassFilter, type NodeLink_PhaserFilter, type NodeLink_SpatialFilter, NodeManager, type NodeManagerEvents, type NodeMessage, type NodeStats, NodeSymbol,
|
|
4347
|
+
export { type AudioOutputs, type Awaitable, type Base64, type BaseNodeStats, type BasePlayOptions, type BotClientOptions, type CPUStats, type ChannelDeletePacket, type ChannelMixFilter, type ClientCustomSearchPlatformUtils, type ClientSearchPlatform, DebugEvents, type DeepRequired, DefaultQueueStore, DefaultSources, DestroyReasons, type DestroyReasonsType, DisconnectReasons, type DisconnectReasonsType, type DistortionFilter, type DuncteSearchPlatform, type EQBand, EQList, type Exception, type FailingAddress, type FilterData, FilterManager, type FloatNumber, type FrameStats, type GitObject, type GuildShardPayload, type IntegerNumber, type InvalidLavalinkRestRequest, type JioSaavnSearchPlatform, type KaraokeFilter, type LavaSearchFilteredResponse, type LavaSearchQuery, type LavaSearchResponse, type LavaSearchType, type LavaSrcSearchPlatform, type LavaSrcSearchPlatformBase, type LavalinkClientSearchPlatform, type LavalinkClientSearchPlatformResolve, type LavalinkFilterData, type LavalinkInfo, LavalinkManager, type LavalinkManagerEvents, LavalinkNode, type LavalinkNodeIdentifier, type LavalinkNodeOptions, type LavalinkPlayOptions, type LavalinkPlayer, type LavalinkPlayerVoice, type LavalinkPlayerVoiceOptions, type LavalinkPlugin_JioSaavn_SourceNames, type LavalinkPlugin_LavaSrc_SourceNames, LavalinkPlugins, type LavalinkSearchPlatform, type LavalinkSourceNames, type LavalinkTrack, type LavalinkTrackInfo, type LoadTypes, type LowPassFilter, type LyricsEvent, type LyricsEventType, type LyricsFoundEvent, type LyricsLine, type LyricsLineEvent, type LyricsNotFoundEvent, type LyricsResult, type ManagerOptions, type ManagerPlayerOptions, type ManagerQueueOptions, ManagerUtils, type MemoryStats, MiniMap, type MiniMapConstructor, type ModifyRequest, type NodeLinkConnectionMetrics, NodeLinkExclusiveEvents, NodeLinkNode, type NodeLink_ChorusFilter, type NodeLink_CompressorFilter, type NodeLink_EchoFilter, type NodeLink_HighPassFilter, type NodeLink_PhaserFilter, type NodeLink_SpatialFilter, NodeManager, type NodeManagerEvents, type NodeMessage, type NodeStats, NodeSymbol, NodeType, type Opaque, type PlayOptions, Player, type PlayerEvent, type PlayerEventType, type PlayerEvents, type PlayerFilters, type PlayerJson, type PlayerOptions, type PlayerUpdateInfo, type PlaylistInfo, type PluginInfo, type PluginObject, Queue, type QueueChangesWatcher, QueueSaver, type QueueStoreManager, QueueSymbol, RecommendationsStrings, ReconnectionState, type RepeatMode, type RequiredManagerOptions, type RotationFilter, type RoutePlanner, type RoutePlannerTypes, type SearchPlatform, type SearchQuery, type SearchResult, type Session, type Severity, SourceLinksRegexes, type SourceNames, type SourcesRegex, type SponsorBlockChapterStarted, type SponsorBlockChaptersLoaded, type SponsorBlockSegment, type SponsorBlockSegmentEventType, type SponsorBlockSegmentEvents, type SponsorBlockSegmentSkipped, type SponsorBlockSegmentsLoaded, type State, type StoredQueue, type TimescaleFilter, type Track, type TrackEndEvent, type TrackEndReason, type TrackExceptionEvent, type TrackInfo, type TrackRequester, type TrackStartEvent, type TrackStuckEvent, TrackSymbol, type TremoloFilter, type UnresolvedQuery, type UnresolvedSearchResult, type UnresolvedTrack, type UnresolvedTrackInfo, UnresolvedTrackSymbol, type VersionObject, type VibratoFilter, type VoicePacket, type VoiceServer, type VoiceState, type WebSocketClosedEvent, type anyObject, audioOutputsData, parseLavalinkConnUrl, queueTrackEnd, safeStringify, validSponsorBlocks };
|
package/dist/index.d.ts
CHANGED
|
@@ -410,7 +410,7 @@ declare const NodeSymbol: unique symbol;
|
|
|
410
410
|
*/
|
|
411
411
|
declare function parseLavalinkConnUrl(connectionUrl: string): {
|
|
412
412
|
authorization: string;
|
|
413
|
-
nodeType:
|
|
413
|
+
nodeType: NodeType;
|
|
414
414
|
id: string;
|
|
415
415
|
host: string;
|
|
416
416
|
port: number;
|
|
@@ -1537,7 +1537,7 @@ type SponsorBlockSegment = "sponsor" | "selfpromo" | "interaction" | "intro" | "
|
|
|
1537
1537
|
*/
|
|
1538
1538
|
interface LavalinkNodeOptions {
|
|
1539
1539
|
/** Specify the Node-Type of this node. Default: Lavalink */
|
|
1540
|
-
nodeType?:
|
|
1540
|
+
nodeType?: NodeType;
|
|
1541
1541
|
/** The Lavalink Server-Ip / Domain-URL */
|
|
1542
1542
|
host: string;
|
|
1543
1543
|
/** The Lavalink Connection Port */
|
|
@@ -1832,7 +1832,10 @@ declare enum ReconnectionState {
|
|
|
1832
1832
|
PENDING = "PENDING",
|
|
1833
1833
|
DESTROYING = "DESTROYING"
|
|
1834
1834
|
}
|
|
1835
|
-
|
|
1835
|
+
declare enum NodeType {
|
|
1836
|
+
Lavalink = "Lavalink",
|
|
1837
|
+
NodeLink = "NodeLink"
|
|
1838
|
+
}
|
|
1836
1839
|
|
|
1837
1840
|
declare class FilterManager {
|
|
1838
1841
|
static EQList: {
|
|
@@ -2891,7 +2894,7 @@ declare class Player {
|
|
|
2891
2894
|
}
|
|
2892
2895
|
|
|
2893
2896
|
declare class NodeLinkNode extends LavalinkNode {
|
|
2894
|
-
nodeType:
|
|
2897
|
+
nodeType: NodeType;
|
|
2895
2898
|
constructor(options: LavalinkNodeOptions, manager: NodeManager);
|
|
2896
2899
|
/**
|
|
2897
2900
|
* Uses the gapless feature to set the next track to be played.
|
|
@@ -2899,6 +2902,12 @@ declare class NodeLinkNode extends LavalinkNode {
|
|
|
2899
2902
|
* @param track if no track provided, it will use the next track from queue
|
|
2900
2903
|
*/
|
|
2901
2904
|
setNextTrackGapLess(player: Player, track?: Track | UnresolvedTrack): Promise<boolean>;
|
|
2905
|
+
/**
|
|
2906
|
+
* Removes the nextTrackGapLess configuration
|
|
2907
|
+
* @param player current player
|
|
2908
|
+
* @param track if no track provided, it will use the next track from queue
|
|
2909
|
+
*/
|
|
2910
|
+
removeNextTrackGapLess(player: Player): Promise<boolean>;
|
|
2902
2911
|
/**
|
|
2903
2912
|
* Retrieves the meaning of a track.
|
|
2904
2913
|
* @param track
|
|
@@ -3058,7 +3067,7 @@ declare class LavalinkNode {
|
|
|
3058
3067
|
private heartBeatPongTimestamp;
|
|
3059
3068
|
private heartBeatInterval?;
|
|
3060
3069
|
private pingTimeout?;
|
|
3061
|
-
nodeType:
|
|
3070
|
+
nodeType: NodeType;
|
|
3062
3071
|
isAlive: boolean;
|
|
3063
3072
|
static _NodeLinkClass: unknown;
|
|
3064
3073
|
/** The provided Options of the Node */
|
|
@@ -3743,13 +3752,13 @@ declare class NodeManager extends EventEmitter {
|
|
|
3743
3752
|
* @param options The options for the node
|
|
3744
3753
|
* @returns The node that was created
|
|
3745
3754
|
*/
|
|
3746
|
-
createNode<T extends LavalinkNode | NodeLinkNode>(options: LavalinkNodeOptions): T;
|
|
3755
|
+
createNode<T extends LavalinkNode | NodeLinkNode>(options: LavalinkNodeOptions | NodeLinkNode | LavalinkNode): T;
|
|
3747
3756
|
/**
|
|
3748
3757
|
* Get the nodes sorted for the least usage, by a sorttype
|
|
3749
3758
|
* @param sortType The type of sorting to use
|
|
3750
3759
|
* @returns
|
|
3751
3760
|
*/
|
|
3752
|
-
leastUsedNodes(sortType?: "memory" | "cpuLavalink" | "cpuSystem" | "calls" | "playingPlayers" | "players"): LavalinkNode[];
|
|
3761
|
+
leastUsedNodes(sortType?: "memory" | "cpuLavalink" | "cpuSystem" | "calls" | "playingPlayers" | "players", filterForNodeTypes?: (NodeType | NodeLinkNode | LavalinkNode)[]): LavalinkNode[];
|
|
3753
3762
|
/**
|
|
3754
3763
|
* Delete a node from the nodeManager and destroy it
|
|
3755
3764
|
* @param node The node to delete
|
|
@@ -3769,10 +3778,10 @@ declare class NodeManager extends EventEmitter {
|
|
|
3769
3778
|
deleteNode(node: LavalinkNodeIdentifier | LavalinkNode | NodeLinkNode, movePlayers?: boolean): void;
|
|
3770
3779
|
/**
|
|
3771
3780
|
* Get a node from the nodeManager
|
|
3772
|
-
* @param node The node to get
|
|
3781
|
+
* @param node The node to get either by idetnifier, by class or by enum
|
|
3773
3782
|
* @returns The node that was retrieved
|
|
3774
3783
|
*/
|
|
3775
|
-
getNode(node: LavalinkNodeIdentifier | LavalinkNode | NodeLinkNode): LavalinkNode | NodeLinkNode | undefined;
|
|
3784
|
+
getNode(node: LavalinkNodeIdentifier | LavalinkNode | NodeLinkNode | NodeType): LavalinkNode | NodeLinkNode | undefined;
|
|
3776
3785
|
}
|
|
3777
3786
|
|
|
3778
3787
|
/**
|
|
@@ -4032,7 +4041,7 @@ type PlayerConstructor<T extends Player = Player> = new (options: PlayerOptions,
|
|
|
4032
4041
|
/** Manager Options used to create the manager */
|
|
4033
4042
|
interface ManagerOptions<CustomPlayerT extends Player = Player> {
|
|
4034
4043
|
/** The Node Options, for all Nodes! (on init) */
|
|
4035
|
-
nodes: LavalinkNodeOptions[];
|
|
4044
|
+
nodes: (LavalinkNodeOptions | NodeLinkNode | LavalinkNode)[];
|
|
4036
4045
|
/** @async The Function to send the voice connection changes from Lavalink to Discord */
|
|
4037
4046
|
sendToShard: (guildId: string, payload: GuildShardPayload) => void;
|
|
4038
4047
|
/** The Bot Client's Data for Authorization */
|
|
@@ -4163,48 +4172,50 @@ declare class LavalinkManager<CustomPlayerT extends Player = Player> extends Eve
|
|
|
4163
4172
|
* port: 2333,
|
|
4164
4173
|
* id: "testnode"
|
|
4165
4174
|
* },
|
|
4175
|
+
* // you can also use the util like this, and it will return a valid node option object. must start with: lavalink:// | nodelink://
|
|
4176
|
+
* // parseLavalinkConnUrl("nodelink://<nodeId>:<nodeAuthorization(Password)>@<NodeHost>:<NodePort>")
|
|
4166
4177
|
* sendToShard(guildId, payload) => client.guilds.cache.get(guildId)?.shard?.send(payload),
|
|
4167
|
-
*
|
|
4168
|
-
*
|
|
4169
|
-
*
|
|
4170
|
-
*
|
|
4171
|
-
*
|
|
4172
|
-
*
|
|
4173
|
-
*
|
|
4174
|
-
*
|
|
4175
|
-
*
|
|
4176
|
-
*
|
|
4177
|
-
*
|
|
4178
|
-
*
|
|
4179
|
-
*
|
|
4180
|
-
*
|
|
4181
|
-
*
|
|
4182
|
-
*
|
|
4183
|
-
*
|
|
4184
|
-
* onEmptyQueue: {
|
|
4185
|
-
* destroyAfterMs: 30_000,
|
|
4186
|
-
* //autoPlayFunction: YourAutoplayFunction,
|
|
4187
|
-
* },
|
|
4188
|
-
* useUnresolvedData: true
|
|
4178
|
+
* ],
|
|
4179
|
+
* client: {
|
|
4180
|
+
* id: process.env.CLIENT_ID,
|
|
4181
|
+
* username: "TESTBOT"
|
|
4182
|
+
* },
|
|
4183
|
+
* // optional Options:
|
|
4184
|
+
* autoSkip: true,
|
|
4185
|
+
* playerOptions: {
|
|
4186
|
+
* applyVolumeAsFilter: false,
|
|
4187
|
+
* clientBasedPositionUpdateInterval: 150,
|
|
4188
|
+
* defaultSearchPlatform: "ytmsearch",
|
|
4189
|
+
* allowCustomSources: false,
|
|
4190
|
+
* volumeDecrementer: 0.75,
|
|
4191
|
+
* //requesterTransformer: YourRequesterTransformerFunction,
|
|
4192
|
+
* onDisconnect: {
|
|
4193
|
+
* autoReconnect: true,
|
|
4194
|
+
* destroyPlayer: false
|
|
4189
4195
|
* },
|
|
4190
|
-
*
|
|
4191
|
-
*
|
|
4192
|
-
* //
|
|
4193
|
-
* //queueChangesWatcher: yourCustomQueueChangesWatcherClass
|
|
4196
|
+
* onEmptyQueue: {
|
|
4197
|
+
* destroyAfterMs: 30_000,
|
|
4198
|
+
* //autoPlayFunction: YourAutoplayFunction,
|
|
4194
4199
|
* },
|
|
4195
|
-
*
|
|
4196
|
-
*
|
|
4197
|
-
*
|
|
4198
|
-
*
|
|
4199
|
-
*
|
|
4200
|
-
*
|
|
4201
|
-
*
|
|
4202
|
-
*
|
|
4203
|
-
*
|
|
4204
|
-
*
|
|
4200
|
+
* useUnresolvedData: true
|
|
4201
|
+
* },
|
|
4202
|
+
* queueOptions: {
|
|
4203
|
+
* maxPreviousTracks: 25,
|
|
4204
|
+
* //queueStore: yourCustomQueueStoreManagerClass,
|
|
4205
|
+
* //queueChangesWatcher: yourCustomQueueChangesWatcherClass
|
|
4206
|
+
* },
|
|
4207
|
+
* linksBlacklist: [],
|
|
4208
|
+
* linksWhitelist: [],
|
|
4209
|
+
* advancedOptions: {
|
|
4210
|
+
* maxFilterFixDuration: 600_000,
|
|
4211
|
+
* debugOptions: {
|
|
4212
|
+
* noAudio: false,
|
|
4213
|
+
* playerDestroy: {
|
|
4214
|
+
* dontThrowError: false,
|
|
4215
|
+
* debugLogs: false
|
|
4205
4216
|
* }
|
|
4206
4217
|
* }
|
|
4207
|
-
*
|
|
4218
|
+
* }
|
|
4208
4219
|
* })
|
|
4209
4220
|
* ```
|
|
4210
4221
|
*/
|
|
@@ -4333,4 +4344,4 @@ declare const LavalinkPlugins: {
|
|
|
4333
4344
|
/** Lavalink Sources regexes for url validations */
|
|
4334
4345
|
declare const SourceLinksRegexes: Record<SourcesRegex, RegExp>;
|
|
4335
4346
|
|
|
4336
|
-
export { type AudioOutputs, type Awaitable, type Base64, type BaseNodeStats, type BasePlayOptions, type BotClientOptions, type CPUStats, type ChannelDeletePacket, type ChannelMixFilter, type ClientCustomSearchPlatformUtils, type ClientSearchPlatform, DebugEvents, type DeepRequired, DefaultQueueStore, DefaultSources, DestroyReasons, type DestroyReasonsType, DisconnectReasons, type DisconnectReasonsType, type DistortionFilter, type DuncteSearchPlatform, type EQBand, EQList, type Exception, type FailingAddress, type FilterData, FilterManager, type FloatNumber, type FrameStats, type GitObject, type GuildShardPayload, type IntegerNumber, type InvalidLavalinkRestRequest, type JioSaavnSearchPlatform, type KaraokeFilter, type LavaSearchFilteredResponse, type LavaSearchQuery, type LavaSearchResponse, type LavaSearchType, type LavaSrcSearchPlatform, type LavaSrcSearchPlatformBase, type LavalinkClientSearchPlatform, type LavalinkClientSearchPlatformResolve, type LavalinkFilterData, type LavalinkInfo, LavalinkManager, type LavalinkManagerEvents, LavalinkNode, type LavalinkNodeIdentifier, type LavalinkNodeOptions, type LavalinkPlayOptions, type LavalinkPlayer, type LavalinkPlayerVoice, type LavalinkPlayerVoiceOptions, type LavalinkPlugin_JioSaavn_SourceNames, type LavalinkPlugin_LavaSrc_SourceNames, LavalinkPlugins, type LavalinkSearchPlatform, type LavalinkSourceNames, type LavalinkTrack, type LavalinkTrackInfo, type LoadTypes, type LowPassFilter, type LyricsEvent, type LyricsEventType, type LyricsFoundEvent, type LyricsLine, type LyricsLineEvent, type LyricsNotFoundEvent, type LyricsResult, type ManagerOptions, type ManagerPlayerOptions, type ManagerQueueOptions, ManagerUtils, type MemoryStats, MiniMap, type MiniMapConstructor, type ModifyRequest, type NodeLinkConnectionMetrics, NodeLinkExclusiveEvents, NodeLinkNode, type NodeLink_ChorusFilter, type NodeLink_CompressorFilter, type NodeLink_EchoFilter, type NodeLink_HighPassFilter, type NodeLink_PhaserFilter, type NodeLink_SpatialFilter, NodeManager, type NodeManagerEvents, type NodeMessage, type NodeStats, NodeSymbol,
|
|
4347
|
+
export { type AudioOutputs, type Awaitable, type Base64, type BaseNodeStats, type BasePlayOptions, type BotClientOptions, type CPUStats, type ChannelDeletePacket, type ChannelMixFilter, type ClientCustomSearchPlatformUtils, type ClientSearchPlatform, DebugEvents, type DeepRequired, DefaultQueueStore, DefaultSources, DestroyReasons, type DestroyReasonsType, DisconnectReasons, type DisconnectReasonsType, type DistortionFilter, type DuncteSearchPlatform, type EQBand, EQList, type Exception, type FailingAddress, type FilterData, FilterManager, type FloatNumber, type FrameStats, type GitObject, type GuildShardPayload, type IntegerNumber, type InvalidLavalinkRestRequest, type JioSaavnSearchPlatform, type KaraokeFilter, type LavaSearchFilteredResponse, type LavaSearchQuery, type LavaSearchResponse, type LavaSearchType, type LavaSrcSearchPlatform, type LavaSrcSearchPlatformBase, type LavalinkClientSearchPlatform, type LavalinkClientSearchPlatformResolve, type LavalinkFilterData, type LavalinkInfo, LavalinkManager, type LavalinkManagerEvents, LavalinkNode, type LavalinkNodeIdentifier, type LavalinkNodeOptions, type LavalinkPlayOptions, type LavalinkPlayer, type LavalinkPlayerVoice, type LavalinkPlayerVoiceOptions, type LavalinkPlugin_JioSaavn_SourceNames, type LavalinkPlugin_LavaSrc_SourceNames, LavalinkPlugins, type LavalinkSearchPlatform, type LavalinkSourceNames, type LavalinkTrack, type LavalinkTrackInfo, type LoadTypes, type LowPassFilter, type LyricsEvent, type LyricsEventType, type LyricsFoundEvent, type LyricsLine, type LyricsLineEvent, type LyricsNotFoundEvent, type LyricsResult, type ManagerOptions, type ManagerPlayerOptions, type ManagerQueueOptions, ManagerUtils, type MemoryStats, MiniMap, type MiniMapConstructor, type ModifyRequest, type NodeLinkConnectionMetrics, NodeLinkExclusiveEvents, NodeLinkNode, type NodeLink_ChorusFilter, type NodeLink_CompressorFilter, type NodeLink_EchoFilter, type NodeLink_HighPassFilter, type NodeLink_PhaserFilter, type NodeLink_SpatialFilter, NodeManager, type NodeManagerEvents, type NodeMessage, type NodeStats, NodeSymbol, NodeType, type Opaque, type PlayOptions, Player, type PlayerEvent, type PlayerEventType, type PlayerEvents, type PlayerFilters, type PlayerJson, type PlayerOptions, type PlayerUpdateInfo, type PlaylistInfo, type PluginInfo, type PluginObject, Queue, type QueueChangesWatcher, QueueSaver, type QueueStoreManager, QueueSymbol, RecommendationsStrings, ReconnectionState, type RepeatMode, type RequiredManagerOptions, type RotationFilter, type RoutePlanner, type RoutePlannerTypes, type SearchPlatform, type SearchQuery, type SearchResult, type Session, type Severity, SourceLinksRegexes, type SourceNames, type SourcesRegex, type SponsorBlockChapterStarted, type SponsorBlockChaptersLoaded, type SponsorBlockSegment, type SponsorBlockSegmentEventType, type SponsorBlockSegmentEvents, type SponsorBlockSegmentSkipped, type SponsorBlockSegmentsLoaded, type State, type StoredQueue, type TimescaleFilter, type Track, type TrackEndEvent, type TrackEndReason, type TrackExceptionEvent, type TrackInfo, type TrackRequester, type TrackStartEvent, type TrackStuckEvent, TrackSymbol, type TremoloFilter, type UnresolvedQuery, type UnresolvedSearchResult, type UnresolvedTrack, type UnresolvedTrackInfo, UnresolvedTrackSymbol, type VersionObject, type VibratoFilter, type VoicePacket, type VoiceServer, type VoiceState, type WebSocketClosedEvent, type anyObject, audioOutputsData, parseLavalinkConnUrl, queueTrackEnd, safeStringify, validSponsorBlocks };
|