lavalink-client 2.5.7 → 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.
- package/README.md +9 -2
- package/dist/index.d.mts +3036 -0
- package/dist/index.d.ts +3036 -0
- package/dist/index.js +4965 -0
- package/dist/index.mjs +4904 -0
- package/package.json +21 -24
- package/dist/cjs/index.d.ts +0 -16
- package/dist/cjs/index.js +0 -19
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/structures/Constants.d.ts +0 -90
- package/dist/cjs/structures/Constants.js +0 -296
- package/dist/cjs/structures/CustomSearches/BandCampSearch.d.ts +0 -3
- package/dist/cjs/structures/CustomSearches/BandCampSearch.js +0 -39
- package/dist/cjs/structures/Filters.d.ts +0 -169
- package/dist/cjs/structures/Filters.js +0 -700
- package/dist/cjs/structures/LavalinkManager.d.ts +0 -232
- package/dist/cjs/structures/LavalinkManager.js +0 -621
- package/dist/cjs/structures/LavalinkManagerStatics.d.ts +0 -15
- package/dist/cjs/structures/LavalinkManagerStatics.js +0 -149
- package/dist/cjs/structures/Node.d.ts +0 -523
- package/dist/cjs/structures/Node.js +0 -1605
- package/dist/cjs/structures/NodeManager.d.ts +0 -100
- package/dist/cjs/structures/NodeManager.js +0 -224
- package/dist/cjs/structures/Player.d.ts +0 -223
- package/dist/cjs/structures/Player.js +0 -807
- package/dist/cjs/structures/Queue.d.ts +0 -186
- package/dist/cjs/structures/Queue.js +0 -390
- package/dist/cjs/structures/Types/Filters.d.ts +0 -190
- package/dist/cjs/structures/Types/Filters.js +0 -2
- package/dist/cjs/structures/Types/Manager.d.ts +0 -271
- package/dist/cjs/structures/Types/Manager.js +0 -2
- package/dist/cjs/structures/Types/Node.d.ts +0 -238
- package/dist/cjs/structures/Types/Node.js +0 -2
- package/dist/cjs/structures/Types/Player.d.ts +0 -114
- package/dist/cjs/structures/Types/Player.js +0 -2
- package/dist/cjs/structures/Types/Queue.d.ts +0 -35
- package/dist/cjs/structures/Types/Queue.js +0 -2
- package/dist/cjs/structures/Types/Track.d.ts +0 -134
- package/dist/cjs/structures/Types/Track.js +0 -2
- package/dist/cjs/structures/Types/Utils.d.ts +0 -443
- package/dist/cjs/structures/Types/Utils.js +0 -2
- package/dist/cjs/structures/Utils.d.ts +0 -116
- package/dist/cjs/structures/Utils.js +0 -567
- package/dist/esm/index.d.ts +0 -16
- package/dist/esm/index.js +0 -16
- package/dist/esm/package.json +0 -3
- package/dist/esm/structures/Constants.d.ts +0 -90
- package/dist/esm/structures/Constants.js +0 -293
- package/dist/esm/structures/CustomSearches/BandCampSearch.d.ts +0 -3
- package/dist/esm/structures/CustomSearches/BandCampSearch.js +0 -35
- package/dist/esm/structures/Filters.d.ts +0 -169
- package/dist/esm/structures/Filters.js +0 -696
- package/dist/esm/structures/LavalinkManager.d.ts +0 -232
- package/dist/esm/structures/LavalinkManager.js +0 -617
- package/dist/esm/structures/LavalinkManagerStatics.d.ts +0 -15
- package/dist/esm/structures/LavalinkManagerStatics.js +0 -146
- package/dist/esm/structures/Node.d.ts +0 -523
- package/dist/esm/structures/Node.js +0 -1600
- package/dist/esm/structures/NodeManager.d.ts +0 -100
- package/dist/esm/structures/NodeManager.js +0 -220
- package/dist/esm/structures/Player.d.ts +0 -223
- package/dist/esm/structures/Player.js +0 -803
- package/dist/esm/structures/Queue.d.ts +0 -186
- package/dist/esm/structures/Queue.js +0 -384
- package/dist/esm/structures/Types/Filters.d.ts +0 -190
- package/dist/esm/structures/Types/Filters.js +0 -1
- package/dist/esm/structures/Types/Manager.d.ts +0 -271
- package/dist/esm/structures/Types/Manager.js +0 -1
- package/dist/esm/structures/Types/Node.d.ts +0 -238
- package/dist/esm/structures/Types/Node.js +0 -1
- package/dist/esm/structures/Types/Player.d.ts +0 -114
- package/dist/esm/structures/Types/Player.js +0 -1
- package/dist/esm/structures/Types/Queue.d.ts +0 -35
- package/dist/esm/structures/Types/Queue.js +0 -1
- package/dist/esm/structures/Types/Track.d.ts +0 -134
- package/dist/esm/structures/Types/Track.js +0 -1
- package/dist/esm/structures/Types/Utils.d.ts +0 -443
- package/dist/esm/structures/Types/Utils.js +0 -1
- package/dist/esm/structures/Utils.d.ts +0 -116
- package/dist/esm/structures/Utils.js +0 -559
- package/dist/types/index.d.ts +0 -16
- package/dist/types/structures/Constants.d.ts +0 -90
- package/dist/types/structures/CustomSearches/BandCampSearch.d.ts +0 -3
- package/dist/types/structures/Filters.d.ts +0 -169
- package/dist/types/structures/LavalinkManager.d.ts +0 -232
- package/dist/types/structures/LavalinkManagerStatics.d.ts +0 -15
- package/dist/types/structures/Node.d.ts +0 -523
- package/dist/types/structures/NodeManager.d.ts +0 -100
- package/dist/types/structures/Player.d.ts +0 -223
- package/dist/types/structures/Queue.d.ts +0 -186
- package/dist/types/structures/Types/Filters.d.ts +0 -190
- package/dist/types/structures/Types/Manager.d.ts +0 -271
- package/dist/types/structures/Types/Node.d.ts +0 -238
- package/dist/types/structures/Types/Player.d.ts +0 -114
- package/dist/types/structures/Types/Queue.d.ts +0 -35
- package/dist/types/structures/Types/Track.d.ts +0 -134
- package/dist/types/structures/Types/Utils.d.ts +0 -443
- package/dist/types/structures/Utils.d.ts +0 -116
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import type { AudioOutputs, ChannelMixFilter, EQBand } from "./Types/Filters.js";
|
|
2
|
-
export declare enum DebugEvents {
|
|
3
|
-
SetSponsorBlock = "SetSponsorBlock",
|
|
4
|
-
DeleteSponsorBlock = "DeleteSponsorBlock",
|
|
5
|
-
TrackEndReplaced = "TrackEndReplaced",
|
|
6
|
-
AutoplayExecution = "AutoplayExecution",
|
|
7
|
-
AutoplayNoSongsAdded = "AutoplayNoSongsAdded",
|
|
8
|
-
AutoplayThresholdSpamLimiter = "AutoplayThresholdSpamLimiter",
|
|
9
|
-
TriggerQueueEmptyInterval = "TriggerQueueEmptyInterval",
|
|
10
|
-
QueueEnded = "QueueEnded",
|
|
11
|
-
TrackStartNewSongsOnly = "TrackStartNewSongsOnly",
|
|
12
|
-
TrackStartNoTrack = "TrackStartNoTrack",
|
|
13
|
-
ResumingFetchingError = "ResumingFetchingError",
|
|
14
|
-
PlayerUpdateNoPlayer = "PlayerUpdateNoPlayer",
|
|
15
|
-
PlayerUpdateFilterFixApply = "PlayerUpdateFilterFixApply",
|
|
16
|
-
PlayerUpdateSuccess = "PlayerUpdateSuccess",
|
|
17
|
-
HeartBeatTriggered = "HeartBeatTriggered",
|
|
18
|
-
NoSocketOnDestroy = "NoSocketOnDestroy",
|
|
19
|
-
SocketTerminateHeartBeatTimeout = "SocketTerminateHeartBeatTimeout",
|
|
20
|
-
TryingConnectWhileConnected = "TryingConnectWhileConnected",
|
|
21
|
-
LavaSearchNothingFound = "LavaSearchNothingFound",
|
|
22
|
-
SearchNothingFound = "SearchNothingFound",
|
|
23
|
-
ValidatingBlacklistLinks = "ValidatingBlacklistLinks",
|
|
24
|
-
ValidatingWhitelistLinks = "ValidatingWhitelistLinks",
|
|
25
|
-
TrackErrorMaxTracksErroredPerTime = "TrackErrorMaxTracksErroredPerTime",
|
|
26
|
-
TrackStuckMaxTracksErroredPerTime = "TrackStuckMaxTracksErroredPerTime",
|
|
27
|
-
PlayerDestroyingSomewhereElse = "PlayerDestroyingSomewhereElse",
|
|
28
|
-
PlayerCreateNodeNotFound = "PlayerCreateNodeNotFound",
|
|
29
|
-
PlayerPlayQueueEmptyTimeoutClear = "PlayerPlayQueueEmptyTimeoutClear",
|
|
30
|
-
PlayerPlayWithTrackReplace = "PlayerPlayWithTrackReplace",
|
|
31
|
-
PlayerPlayUnresolvedTrack = "PlayerPlayUnresolvedTrack",
|
|
32
|
-
PlayerPlayUnresolvedTrackFailed = "PlayerPlayUnresolvedTrackFailed",
|
|
33
|
-
PlayerVolumeAsFilter = "PlayerVolumeAsFilter",
|
|
34
|
-
BandcampSearchLokalEngine = "BandcampSearchLokalEngine",
|
|
35
|
-
PlayerChangeNode = "PlayerChangeNode",
|
|
36
|
-
BuildTrackError = "BuildTrackError",
|
|
37
|
-
TransformRequesterFunctionFailed = "TransformRequesterFunctionFailed",
|
|
38
|
-
GetClosestTrackFailed = "GetClosestTrackFailed",
|
|
39
|
-
PlayerDeleteInsteadOfDestroy = "PlayerDeleteInsteadOfDestroy",
|
|
40
|
-
FailedToConnectToNodes = "FailedToConnectToNodes",
|
|
41
|
-
NoAudioDebug = "NoAudioDebug",
|
|
42
|
-
PlayerAutoReconnect = "PlayerAutoReconnect"
|
|
43
|
-
}
|
|
44
|
-
export declare enum DestroyReasons {
|
|
45
|
-
QueueEmpty = "QueueEmpty",
|
|
46
|
-
NodeDestroy = "NodeDestroy",
|
|
47
|
-
NodeDeleted = "NodeDeleted",
|
|
48
|
-
LavalinkNoVoice = "LavalinkNoVoice",
|
|
49
|
-
NodeReconnectFail = "NodeReconnectFail",
|
|
50
|
-
Disconnected = "Disconnected",
|
|
51
|
-
PlayerReconnectFail = "PlayerReconnectFail",
|
|
52
|
-
PlayerChangeNodeFail = "PlayerChangeNodeFail",
|
|
53
|
-
PlayerChangeNodeFailNoEligibleNode = "PlayerChangeNodeFailNoEligibleNode",
|
|
54
|
-
ChannelDeleted = "ChannelDeleted",
|
|
55
|
-
DisconnectAllNodes = "DisconnectAllNodes",
|
|
56
|
-
ReconnectAllNodes = "ReconnectAllNodes",
|
|
57
|
-
TrackErrorMaxTracksErroredPerTime = "TrackErrorMaxTracksErroredPerTime",
|
|
58
|
-
TrackStuckMaxTracksErroredPerTime = "TrackStuckMaxTracksErroredPerTime"
|
|
59
|
-
}
|
|
60
|
-
export declare enum DisconnectReasons {
|
|
61
|
-
Disconnected = "Disconnected",
|
|
62
|
-
DisconnectAllNodes = "DisconnectAllNodes"
|
|
63
|
-
}
|
|
64
|
-
export declare const validSponsorBlocks: string[];
|
|
65
|
-
/** The audio Outputs Data map declaration */
|
|
66
|
-
export declare const audioOutputsData: Record<AudioOutputs, ChannelMixFilter>;
|
|
67
|
-
export declare const EQList: {
|
|
68
|
-
/** A Bassboost Equalizer, so high it distorts the audio */
|
|
69
|
-
BassboostEarrape: EQBand[];
|
|
70
|
-
/** A High and decent Bassboost Equalizer */
|
|
71
|
-
BassboostHigh: EQBand[];
|
|
72
|
-
/** A decent Bassboost Equalizer */
|
|
73
|
-
BassboostMedium: EQBand[];
|
|
74
|
-
/** A slight Bassboost Equalizer */
|
|
75
|
-
BassboostLow: EQBand[];
|
|
76
|
-
/** Makes the Music slightly "better" */
|
|
77
|
-
BetterMusic: EQBand[];
|
|
78
|
-
/** Makes the Music sound like rock music / sound rock music better */
|
|
79
|
-
Rock: EQBand[];
|
|
80
|
-
/** Makes the Music sound like Classic music / sound Classic music better */
|
|
81
|
-
Classic: EQBand[];
|
|
82
|
-
/** Makes the Music sound like Pop music / sound Pop music better */
|
|
83
|
-
Pop: EQBand[];
|
|
84
|
-
/** Makes the Music sound like Electronic music / sound Electronic music better */
|
|
85
|
-
Electronic: EQBand[];
|
|
86
|
-
/** Boosts all Bands slightly for louder and fuller sound */
|
|
87
|
-
FullSound: EQBand[];
|
|
88
|
-
/** Boosts basses + lower highs for a pro gaming sound */
|
|
89
|
-
Gaming: EQBand[];
|
|
90
|
-
};
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
export var DebugEvents;
|
|
2
|
-
(function (DebugEvents) {
|
|
3
|
-
DebugEvents["SetSponsorBlock"] = "SetSponsorBlock";
|
|
4
|
-
DebugEvents["DeleteSponsorBlock"] = "DeleteSponsorBlock";
|
|
5
|
-
DebugEvents["TrackEndReplaced"] = "TrackEndReplaced";
|
|
6
|
-
DebugEvents["AutoplayExecution"] = "AutoplayExecution";
|
|
7
|
-
DebugEvents["AutoplayNoSongsAdded"] = "AutoplayNoSongsAdded";
|
|
8
|
-
DebugEvents["AutoplayThresholdSpamLimiter"] = "AutoplayThresholdSpamLimiter";
|
|
9
|
-
DebugEvents["TriggerQueueEmptyInterval"] = "TriggerQueueEmptyInterval";
|
|
10
|
-
DebugEvents["QueueEnded"] = "QueueEnded";
|
|
11
|
-
DebugEvents["TrackStartNewSongsOnly"] = "TrackStartNewSongsOnly";
|
|
12
|
-
DebugEvents["TrackStartNoTrack"] = "TrackStartNoTrack";
|
|
13
|
-
DebugEvents["ResumingFetchingError"] = "ResumingFetchingError";
|
|
14
|
-
DebugEvents["PlayerUpdateNoPlayer"] = "PlayerUpdateNoPlayer";
|
|
15
|
-
DebugEvents["PlayerUpdateFilterFixApply"] = "PlayerUpdateFilterFixApply";
|
|
16
|
-
DebugEvents["PlayerUpdateSuccess"] = "PlayerUpdateSuccess";
|
|
17
|
-
DebugEvents["HeartBeatTriggered"] = "HeartBeatTriggered";
|
|
18
|
-
DebugEvents["NoSocketOnDestroy"] = "NoSocketOnDestroy";
|
|
19
|
-
DebugEvents["SocketTerminateHeartBeatTimeout"] = "SocketTerminateHeartBeatTimeout";
|
|
20
|
-
DebugEvents["TryingConnectWhileConnected"] = "TryingConnectWhileConnected";
|
|
21
|
-
DebugEvents["LavaSearchNothingFound"] = "LavaSearchNothingFound";
|
|
22
|
-
DebugEvents["SearchNothingFound"] = "SearchNothingFound";
|
|
23
|
-
DebugEvents["ValidatingBlacklistLinks"] = "ValidatingBlacklistLinks";
|
|
24
|
-
DebugEvents["ValidatingWhitelistLinks"] = "ValidatingWhitelistLinks";
|
|
25
|
-
DebugEvents["TrackErrorMaxTracksErroredPerTime"] = "TrackErrorMaxTracksErroredPerTime";
|
|
26
|
-
DebugEvents["TrackStuckMaxTracksErroredPerTime"] = "TrackStuckMaxTracksErroredPerTime";
|
|
27
|
-
DebugEvents["PlayerDestroyingSomewhereElse"] = "PlayerDestroyingSomewhereElse";
|
|
28
|
-
DebugEvents["PlayerCreateNodeNotFound"] = "PlayerCreateNodeNotFound";
|
|
29
|
-
DebugEvents["PlayerPlayQueueEmptyTimeoutClear"] = "PlayerPlayQueueEmptyTimeoutClear";
|
|
30
|
-
DebugEvents["PlayerPlayWithTrackReplace"] = "PlayerPlayWithTrackReplace";
|
|
31
|
-
DebugEvents["PlayerPlayUnresolvedTrack"] = "PlayerPlayUnresolvedTrack";
|
|
32
|
-
DebugEvents["PlayerPlayUnresolvedTrackFailed"] = "PlayerPlayUnresolvedTrackFailed";
|
|
33
|
-
DebugEvents["PlayerVolumeAsFilter"] = "PlayerVolumeAsFilter";
|
|
34
|
-
DebugEvents["BandcampSearchLokalEngine"] = "BandcampSearchLokalEngine";
|
|
35
|
-
DebugEvents["PlayerChangeNode"] = "PlayerChangeNode";
|
|
36
|
-
DebugEvents["BuildTrackError"] = "BuildTrackError";
|
|
37
|
-
DebugEvents["TransformRequesterFunctionFailed"] = "TransformRequesterFunctionFailed";
|
|
38
|
-
DebugEvents["GetClosestTrackFailed"] = "GetClosestTrackFailed";
|
|
39
|
-
DebugEvents["PlayerDeleteInsteadOfDestroy"] = "PlayerDeleteInsteadOfDestroy";
|
|
40
|
-
DebugEvents["FailedToConnectToNodes"] = "FailedToConnectToNodes";
|
|
41
|
-
DebugEvents["NoAudioDebug"] = "NoAudioDebug";
|
|
42
|
-
DebugEvents["PlayerAutoReconnect"] = "PlayerAutoReconnect";
|
|
43
|
-
})(DebugEvents || (DebugEvents = {}));
|
|
44
|
-
export var DestroyReasons;
|
|
45
|
-
(function (DestroyReasons) {
|
|
46
|
-
DestroyReasons["QueueEmpty"] = "QueueEmpty";
|
|
47
|
-
DestroyReasons["NodeDestroy"] = "NodeDestroy";
|
|
48
|
-
DestroyReasons["NodeDeleted"] = "NodeDeleted";
|
|
49
|
-
DestroyReasons["LavalinkNoVoice"] = "LavalinkNoVoice";
|
|
50
|
-
DestroyReasons["NodeReconnectFail"] = "NodeReconnectFail";
|
|
51
|
-
DestroyReasons["Disconnected"] = "Disconnected";
|
|
52
|
-
DestroyReasons["PlayerReconnectFail"] = "PlayerReconnectFail";
|
|
53
|
-
DestroyReasons["PlayerChangeNodeFail"] = "PlayerChangeNodeFail";
|
|
54
|
-
DestroyReasons["PlayerChangeNodeFailNoEligibleNode"] = "PlayerChangeNodeFailNoEligibleNode";
|
|
55
|
-
DestroyReasons["ChannelDeleted"] = "ChannelDeleted";
|
|
56
|
-
DestroyReasons["DisconnectAllNodes"] = "DisconnectAllNodes";
|
|
57
|
-
DestroyReasons["ReconnectAllNodes"] = "ReconnectAllNodes";
|
|
58
|
-
DestroyReasons["TrackErrorMaxTracksErroredPerTime"] = "TrackErrorMaxTracksErroredPerTime";
|
|
59
|
-
DestroyReasons["TrackStuckMaxTracksErroredPerTime"] = "TrackStuckMaxTracksErroredPerTime";
|
|
60
|
-
})(DestroyReasons || (DestroyReasons = {}));
|
|
61
|
-
;
|
|
62
|
-
export var DisconnectReasons;
|
|
63
|
-
(function (DisconnectReasons) {
|
|
64
|
-
DisconnectReasons["Disconnected"] = "Disconnected";
|
|
65
|
-
DisconnectReasons["DisconnectAllNodes"] = "DisconnectAllNodes";
|
|
66
|
-
})(DisconnectReasons || (DisconnectReasons = {}));
|
|
67
|
-
export const validSponsorBlocks = ["sponsor", "selfpromo", "interaction", "intro", "outro", "preview", "music_offtopic", "filler"];
|
|
68
|
-
/** The audio Outputs Data map declaration */
|
|
69
|
-
export const audioOutputsData = {
|
|
70
|
-
mono: {
|
|
71
|
-
leftToLeft: 0.5, //each channel should in total 0 | 1, 0 === off, 1 === on, 0.5+0.5 === 1
|
|
72
|
-
leftToRight: 0.5,
|
|
73
|
-
rightToLeft: 0.5,
|
|
74
|
-
rightToRight: 0.5,
|
|
75
|
-
},
|
|
76
|
-
stereo: {
|
|
77
|
-
leftToLeft: 1,
|
|
78
|
-
leftToRight: 0,
|
|
79
|
-
rightToLeft: 0,
|
|
80
|
-
rightToRight: 1,
|
|
81
|
-
},
|
|
82
|
-
left: {
|
|
83
|
-
leftToLeft: 1,
|
|
84
|
-
leftToRight: 0,
|
|
85
|
-
rightToLeft: 1,
|
|
86
|
-
rightToRight: 0,
|
|
87
|
-
},
|
|
88
|
-
right: {
|
|
89
|
-
leftToLeft: 0,
|
|
90
|
-
leftToRight: 1,
|
|
91
|
-
rightToLeft: 0,
|
|
92
|
-
rightToRight: 1,
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
export const EQList = {
|
|
96
|
-
/** A Bassboost Equalizer, so high it distorts the audio */
|
|
97
|
-
BassboostEarrape: [
|
|
98
|
-
{ band: 0, gain: 0.6 * 0.375 },
|
|
99
|
-
{ band: 1, gain: 0.67 * 0.375 },
|
|
100
|
-
{ band: 2, gain: 0.67 * 0.375 },
|
|
101
|
-
{ band: 3, gain: 0.4 * 0.375 },
|
|
102
|
-
{ band: 4, gain: -0.5 * 0.375 },
|
|
103
|
-
{ band: 5, gain: 0.15 * 0.375 },
|
|
104
|
-
{ band: 6, gain: -0.45 * 0.375 },
|
|
105
|
-
{ band: 7, gain: 0.23 * 0.375 },
|
|
106
|
-
{ band: 8, gain: 0.35 * 0.375 },
|
|
107
|
-
{ band: 9, gain: 0.45 * 0.375 },
|
|
108
|
-
{ band: 10, gain: 0.55 * 0.375 },
|
|
109
|
-
{ band: 11, gain: -0.6 * 0.375 },
|
|
110
|
-
{ band: 12, gain: 0.55 * 0.375 },
|
|
111
|
-
{ band: 13, gain: -0.5 * 0.375 },
|
|
112
|
-
{ band: 14, gain: -0.75 * 0.375 },
|
|
113
|
-
],
|
|
114
|
-
/** A High and decent Bassboost Equalizer */
|
|
115
|
-
BassboostHigh: [
|
|
116
|
-
{ band: 0, gain: 0.6 * 0.25 },
|
|
117
|
-
{ band: 1, gain: 0.67 * 0.25 },
|
|
118
|
-
{ band: 2, gain: 0.67 * 0.25 },
|
|
119
|
-
{ band: 3, gain: 0.4 * 0.25 },
|
|
120
|
-
{ band: 4, gain: -0.5 * 0.25 },
|
|
121
|
-
{ band: 5, gain: 0.15 * 0.25 },
|
|
122
|
-
{ band: 6, gain: -0.45 * 0.25 },
|
|
123
|
-
{ band: 7, gain: 0.23 * 0.25 },
|
|
124
|
-
{ band: 8, gain: 0.35 * 0.25 },
|
|
125
|
-
{ band: 9, gain: 0.45 * 0.25 },
|
|
126
|
-
{ band: 10, gain: 0.55 * 0.25 },
|
|
127
|
-
{ band: 11, gain: -0.6 * 0.25 },
|
|
128
|
-
{ band: 12, gain: 0.55 * 0.25 },
|
|
129
|
-
{ band: 13, gain: -0.5 * 0.25 },
|
|
130
|
-
{ band: 14, gain: -0.75 * 0.25 },
|
|
131
|
-
],
|
|
132
|
-
/** A decent Bassboost Equalizer */
|
|
133
|
-
BassboostMedium: [
|
|
134
|
-
{ band: 0, gain: 0.6 * 0.1875 },
|
|
135
|
-
{ band: 1, gain: 0.67 * 0.1875 },
|
|
136
|
-
{ band: 2, gain: 0.67 * 0.1875 },
|
|
137
|
-
{ band: 3, gain: 0.4 * 0.1875 },
|
|
138
|
-
{ band: 4, gain: -0.5 * 0.1875 },
|
|
139
|
-
{ band: 5, gain: 0.15 * 0.1875 },
|
|
140
|
-
{ band: 6, gain: -0.45 * 0.1875 },
|
|
141
|
-
{ band: 7, gain: 0.23 * 0.1875 },
|
|
142
|
-
{ band: 8, gain: 0.35 * 0.1875 },
|
|
143
|
-
{ band: 9, gain: 0.45 * 0.1875 },
|
|
144
|
-
{ band: 10, gain: 0.55 * 0.1875 },
|
|
145
|
-
{ band: 11, gain: -0.6 * 0.1875 },
|
|
146
|
-
{ band: 12, gain: 0.55 * 0.1875 },
|
|
147
|
-
{ band: 13, gain: -0.5 * 0.1875 },
|
|
148
|
-
{ band: 14, gain: -0.75 * 0.1875 },
|
|
149
|
-
],
|
|
150
|
-
/** A slight Bassboost Equalizer */
|
|
151
|
-
BassboostLow: [
|
|
152
|
-
{ band: 0, gain: 0.6 * 0.125 },
|
|
153
|
-
{ band: 1, gain: 0.67 * 0.125 },
|
|
154
|
-
{ band: 2, gain: 0.67 * 0.125 },
|
|
155
|
-
{ band: 3, gain: 0.4 * 0.125 },
|
|
156
|
-
{ band: 4, gain: -0.5 * 0.125 },
|
|
157
|
-
{ band: 5, gain: 0.15 * 0.125 },
|
|
158
|
-
{ band: 6, gain: -0.45 * 0.125 },
|
|
159
|
-
{ band: 7, gain: 0.23 * 0.125 },
|
|
160
|
-
{ band: 8, gain: 0.35 * 0.125 },
|
|
161
|
-
{ band: 9, gain: 0.45 * 0.125 },
|
|
162
|
-
{ band: 10, gain: 0.55 * 0.125 },
|
|
163
|
-
{ band: 11, gain: -0.6 * 0.125 },
|
|
164
|
-
{ band: 12, gain: 0.55 * 0.125 },
|
|
165
|
-
{ band: 13, gain: -0.5 * 0.125 },
|
|
166
|
-
{ band: 14, gain: -0.75 * 0.125 },
|
|
167
|
-
],
|
|
168
|
-
/** Makes the Music slightly "better" */
|
|
169
|
-
BetterMusic: [
|
|
170
|
-
{ band: 0, gain: 0.25 },
|
|
171
|
-
{ band: 1, gain: 0.025 },
|
|
172
|
-
{ band: 2, gain: 0.0125 },
|
|
173
|
-
{ band: 3, gain: 0 },
|
|
174
|
-
{ band: 4, gain: 0 },
|
|
175
|
-
{ band: 5, gain: -0.0125 },
|
|
176
|
-
{ band: 6, gain: -0.025 },
|
|
177
|
-
{ band: 7, gain: -0.0175 },
|
|
178
|
-
{ band: 8, gain: 0 },
|
|
179
|
-
{ band: 9, gain: 0 },
|
|
180
|
-
{ band: 10, gain: 0.0125 },
|
|
181
|
-
{ band: 11, gain: 0.025 },
|
|
182
|
-
{ band: 12, gain: 0.25 },
|
|
183
|
-
{ band: 13, gain: 0.125 },
|
|
184
|
-
{ band: 14, gain: 0.125 },
|
|
185
|
-
],
|
|
186
|
-
/** Makes the Music sound like rock music / sound rock music better */
|
|
187
|
-
Rock: [
|
|
188
|
-
{ band: 0, gain: 0.300 },
|
|
189
|
-
{ band: 1, gain: 0.250 },
|
|
190
|
-
{ band: 2, gain: 0.200 },
|
|
191
|
-
{ band: 3, gain: 0.100 },
|
|
192
|
-
{ band: 4, gain: 0.050 },
|
|
193
|
-
{ band: 5, gain: -0.050 },
|
|
194
|
-
{ band: 6, gain: -0.150 },
|
|
195
|
-
{ band: 7, gain: -0.200 },
|
|
196
|
-
{ band: 8, gain: -0.100 },
|
|
197
|
-
{ band: 9, gain: -0.050 },
|
|
198
|
-
{ band: 10, gain: 0.050 },
|
|
199
|
-
{ band: 11, gain: 0.100 },
|
|
200
|
-
{ band: 12, gain: 0.200 },
|
|
201
|
-
{ band: 13, gain: 0.250 },
|
|
202
|
-
{ band: 14, gain: 0.300 },
|
|
203
|
-
],
|
|
204
|
-
/** Makes the Music sound like Classic music / sound Classic music better */
|
|
205
|
-
Classic: [
|
|
206
|
-
{ band: 0, gain: 0.375 },
|
|
207
|
-
{ band: 1, gain: 0.350 },
|
|
208
|
-
{ band: 2, gain: 0.125 },
|
|
209
|
-
{ band: 3, gain: 0 },
|
|
210
|
-
{ band: 4, gain: 0 },
|
|
211
|
-
{ band: 5, gain: 0.125 },
|
|
212
|
-
{ band: 6, gain: 0.550 },
|
|
213
|
-
{ band: 7, gain: 0.050 },
|
|
214
|
-
{ band: 8, gain: 0.125 },
|
|
215
|
-
{ band: 9, gain: 0.250 },
|
|
216
|
-
{ band: 10, gain: 0.200 },
|
|
217
|
-
{ band: 11, gain: 0.250 },
|
|
218
|
-
{ band: 12, gain: 0.300 },
|
|
219
|
-
{ band: 13, gain: 0.250 },
|
|
220
|
-
{ band: 14, gain: 0.300 },
|
|
221
|
-
],
|
|
222
|
-
/** Makes the Music sound like Pop music / sound Pop music better */
|
|
223
|
-
Pop: [
|
|
224
|
-
{ band: 0, gain: 0.2635 },
|
|
225
|
-
{ band: 1, gain: 0.22141 },
|
|
226
|
-
{ band: 2, gain: -0.21141 },
|
|
227
|
-
{ band: 3, gain: -0.1851 },
|
|
228
|
-
{ band: 4, gain: -0.155 },
|
|
229
|
-
{ band: 5, gain: 0.21141 },
|
|
230
|
-
{ band: 6, gain: 0.22456 },
|
|
231
|
-
{ band: 7, gain: 0.237 },
|
|
232
|
-
{ band: 8, gain: 0.237 },
|
|
233
|
-
{ band: 9, gain: 0.237 },
|
|
234
|
-
{ band: 10, gain: -0.05 },
|
|
235
|
-
{ band: 11, gain: -0.116 },
|
|
236
|
-
{ band: 12, gain: 0.192 },
|
|
237
|
-
{ band: 13, gain: 0 },
|
|
238
|
-
],
|
|
239
|
-
/** Makes the Music sound like Electronic music / sound Electronic music better */
|
|
240
|
-
Electronic: [
|
|
241
|
-
{ band: 0, gain: 0.375 },
|
|
242
|
-
{ band: 1, gain: 0.350 },
|
|
243
|
-
{ band: 2, gain: 0.125 },
|
|
244
|
-
{ band: 3, gain: 0 },
|
|
245
|
-
{ band: 4, gain: 0 },
|
|
246
|
-
{ band: 5, gain: -0.125 },
|
|
247
|
-
{ band: 6, gain: -0.125 },
|
|
248
|
-
{ band: 7, gain: 0 },
|
|
249
|
-
{ band: 8, gain: 0.25 },
|
|
250
|
-
{ band: 9, gain: 0.125 },
|
|
251
|
-
{ band: 10, gain: 0.15 },
|
|
252
|
-
{ band: 11, gain: 0.2 },
|
|
253
|
-
{ band: 12, gain: 0.250 },
|
|
254
|
-
{ band: 13, gain: 0.350 },
|
|
255
|
-
{ band: 14, gain: 0.400 },
|
|
256
|
-
],
|
|
257
|
-
/** Boosts all Bands slightly for louder and fuller sound */
|
|
258
|
-
FullSound: [
|
|
259
|
-
{ band: 0, gain: 0.25 + 0.375 },
|
|
260
|
-
{ band: 1, gain: 0.25 + 0.025 },
|
|
261
|
-
{ band: 2, gain: 0.25 + 0.0125 },
|
|
262
|
-
{ band: 3, gain: 0.25 + 0 },
|
|
263
|
-
{ band: 4, gain: 0.25 + 0 },
|
|
264
|
-
{ band: 5, gain: 0.25 + -0.0125 },
|
|
265
|
-
{ band: 6, gain: 0.25 + -0.025 },
|
|
266
|
-
{ band: 7, gain: 0.25 + -0.0175 },
|
|
267
|
-
{ band: 8, gain: 0.25 + 0 },
|
|
268
|
-
{ band: 9, gain: 0.25 + 0 },
|
|
269
|
-
{ band: 10, gain: 0.25 + 0.0125 },
|
|
270
|
-
{ band: 11, gain: 0.25 + 0.025 },
|
|
271
|
-
{ band: 12, gain: 0.25 + 0.375 },
|
|
272
|
-
{ band: 13, gain: 0.25 + 0.125 },
|
|
273
|
-
{ band: 14, gain: 0.25 + 0.125 },
|
|
274
|
-
],
|
|
275
|
-
/** Boosts basses + lower highs for a pro gaming sound */
|
|
276
|
-
Gaming: [
|
|
277
|
-
{ band: 0, gain: 0.350 },
|
|
278
|
-
{ band: 1, gain: 0.300 },
|
|
279
|
-
{ band: 2, gain: 0.250 },
|
|
280
|
-
{ band: 3, gain: 0.200 },
|
|
281
|
-
{ band: 4, gain: 0.150 },
|
|
282
|
-
{ band: 5, gain: 0.100 },
|
|
283
|
-
{ band: 6, gain: 0.050 },
|
|
284
|
-
{ band: 7, gain: -0.0 },
|
|
285
|
-
{ band: 8, gain: -0.050 },
|
|
286
|
-
{ band: 9, gain: -0.100 },
|
|
287
|
-
{ band: 10, gain: -0.150 },
|
|
288
|
-
{ band: 11, gain: -0.200 },
|
|
289
|
-
{ band: 12, gain: -0.250 },
|
|
290
|
-
{ band: 13, gain: -0.300 },
|
|
291
|
-
{ band: 14, gain: -0.350 },
|
|
292
|
-
],
|
|
293
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export const bandCampSearch = async (player, query, requestUser) => {
|
|
2
|
-
let error = null;
|
|
3
|
-
let tracks = [];
|
|
4
|
-
if (player.LavalinkManager.options.advancedOptions.debugOptions.logCustomSearches)
|
|
5
|
-
console.log(`Lavalink-Client-Debug | SEARCHING | - ${query} on lavalink-client`);
|
|
6
|
-
player.LavalinkManager.utils.validateQueryString(player.node, query);
|
|
7
|
-
try {
|
|
8
|
-
const requestUrl = new URL("https://bandcamp.com/api/nusearch/2/autocomplete");
|
|
9
|
-
requestUrl.searchParams.append("q", query);
|
|
10
|
-
const data = await fetch(requestUrl.toString(), {
|
|
11
|
-
headers: {
|
|
12
|
-
'User-Agent': 'android-async-http/1.4.1 (http://loopj.com/android-async-http)',
|
|
13
|
-
'Cookie': '$Version=1'
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
const json = await data.json();
|
|
17
|
-
tracks = json?.results?.filter(x => !!x && typeof x === "object" && "type" in x && x.type === "t").map?.(item => player.LavalinkManager.utils.buildUnresolvedTrack({
|
|
18
|
-
uri: item.url || item.uri,
|
|
19
|
-
artworkUrl: item.img,
|
|
20
|
-
author: item.band_name,
|
|
21
|
-
title: item.name,
|
|
22
|
-
identifier: item.id ? `${item.id}` : item.url?.split("/").reverse()[0],
|
|
23
|
-
}, requestUser));
|
|
24
|
-
}
|
|
25
|
-
catch (e) {
|
|
26
|
-
error = e;
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
loadType: "search",
|
|
30
|
-
exception: error,
|
|
31
|
-
pluginInfo: {},
|
|
32
|
-
playlist: null,
|
|
33
|
-
tracks: tracks
|
|
34
|
-
};
|
|
35
|
-
};
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import type { Player } from "./Player.js";
|
|
2
|
-
import type { AudioOutputs, EQBand, FilterData, PlayerFilters, TimescaleFilter } from "./Types/Filters.js";
|
|
3
|
-
/**
|
|
4
|
-
* The FilterManager for each player
|
|
5
|
-
*/
|
|
6
|
-
export declare class FilterManager {
|
|
7
|
-
/** The Equalizer bands currently applied to the Lavalink Server */
|
|
8
|
-
equalizerBands: EQBand[];
|
|
9
|
-
/** Private Util for the instaFix Filters option */
|
|
10
|
-
filterUpdatedState: boolean;
|
|
11
|
-
/** All "Active" / "disabled" Player Filters */
|
|
12
|
-
filters: PlayerFilters;
|
|
13
|
-
/** The Filter Data sent to Lavalink, only if the filter is enabled (ofc.) */
|
|
14
|
-
data: FilterData;
|
|
15
|
-
/** The Player assigned to this Filter Manager */
|
|
16
|
-
player: Player;
|
|
17
|
-
/** The Constructor for the FilterManager */
|
|
18
|
-
constructor(player: Player);
|
|
19
|
-
/**
|
|
20
|
-
* Apply Player filters for lavalink filter sending data, if the filter is enabled / not
|
|
21
|
-
*/
|
|
22
|
-
applyPlayerFilters(): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Checks if the filters are correctly stated (active / not-active)
|
|
25
|
-
* @param oldFilterTimescale
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
checkFiltersState(oldFilterTimescale?: Partial<TimescaleFilter>): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Reset all Filters
|
|
31
|
-
*/
|
|
32
|
-
resetFilters(): Promise<PlayerFilters>;
|
|
33
|
-
/**
|
|
34
|
-
* Set the Filter Volume
|
|
35
|
-
* @param volume
|
|
36
|
-
* @returns
|
|
37
|
-
*/
|
|
38
|
-
setVolume(volume: number): Promise<boolean>;
|
|
39
|
-
/**
|
|
40
|
-
* Set the AudioOutput Filter
|
|
41
|
-
* @param type
|
|
42
|
-
* @returns
|
|
43
|
-
*/
|
|
44
|
-
setAudioOutput(type: AudioOutputs): Promise<AudioOutputs>;
|
|
45
|
-
/**
|
|
46
|
-
* Set custom filter.timescale#speed . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal
|
|
47
|
-
* @param speed
|
|
48
|
-
* @returns
|
|
49
|
-
*/
|
|
50
|
-
setSpeed(speed?: number): Promise<boolean>;
|
|
51
|
-
/**
|
|
52
|
-
* Set custom filter.timescale#pitch . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal
|
|
53
|
-
* @param speed
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
setPitch(pitch?: number): Promise<boolean>;
|
|
57
|
-
/**
|
|
58
|
-
* Set custom filter.timescale#rate . This method disabled both: nightcore & vaporwave. use 1 to reset it to normal
|
|
59
|
-
* @param speed
|
|
60
|
-
* @returns
|
|
61
|
-
*/
|
|
62
|
-
setRate(rate?: number): Promise<boolean>;
|
|
63
|
-
/**
|
|
64
|
-
* Enables / Disables the rotation effect, (Optional: provide your Own Data)
|
|
65
|
-
* @param rotationHz
|
|
66
|
-
* @returns
|
|
67
|
-
*/
|
|
68
|
-
toggleRotation(rotationHz?: number): Promise<boolean>;
|
|
69
|
-
/**
|
|
70
|
-
* Enables / Disables the Vibrato effect, (Optional: provide your Own Data)
|
|
71
|
-
* @param frequency
|
|
72
|
-
* @param depth
|
|
73
|
-
* @returns
|
|
74
|
-
*/
|
|
75
|
-
toggleVibrato(frequency?: number, depth?: number): Promise<boolean>;
|
|
76
|
-
/**
|
|
77
|
-
* Enables / Disables the Tremolo effect, (Optional: provide your Own Data)
|
|
78
|
-
* @param frequency
|
|
79
|
-
* @param depth
|
|
80
|
-
* @returns
|
|
81
|
-
*/
|
|
82
|
-
toggleTremolo(frequency?: number, depth?: number): Promise<boolean>;
|
|
83
|
-
/**
|
|
84
|
-
* Enables / Disables the LowPass effect, (Optional: provide your Own Data)
|
|
85
|
-
* @param smoothing
|
|
86
|
-
* @returns
|
|
87
|
-
*/
|
|
88
|
-
toggleLowPass(smoothing?: number): Promise<boolean>;
|
|
89
|
-
lavalinkLavaDspxPlugin: {
|
|
90
|
-
/**
|
|
91
|
-
* Enables / Disables the LowPass effect, (Optional: provide your Own Data)
|
|
92
|
-
* @param boostFactor
|
|
93
|
-
* @param cutoffFrequency
|
|
94
|
-
* @returns
|
|
95
|
-
*/
|
|
96
|
-
toggleLowPass: (boostFactor?: number, cutoffFrequency?: number) => Promise<boolean>;
|
|
97
|
-
/**
|
|
98
|
-
* Enables / Disables the HighPass effect, (Optional: provide your Own Data)
|
|
99
|
-
* @param boostFactor
|
|
100
|
-
* @param cutoffFrequency
|
|
101
|
-
* @returns
|
|
102
|
-
*/
|
|
103
|
-
toggleHighPass: (boostFactor?: number, cutoffFrequency?: number) => Promise<boolean>;
|
|
104
|
-
/**
|
|
105
|
-
* Enables / Disables the Normalization effect.
|
|
106
|
-
* @param {number} [maxAmplitude=0.75] - The maximum amplitude of the audio.
|
|
107
|
-
* @param {boolean} [adaptive=true] - Whether to use adaptive normalization or not.
|
|
108
|
-
* @returns {Promise<boolean>} - The state of the filter after execution.
|
|
109
|
-
*/
|
|
110
|
-
toggleNormalization: (maxAmplitude?: number, adaptive?: boolean) => Promise<boolean>;
|
|
111
|
-
/**
|
|
112
|
-
* Enables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data)
|
|
113
|
-
* @param {number} [decay=0.5] - The decay of the echo effect.
|
|
114
|
-
* @param {number} [echoLength=0.5] - The length of the echo effect.
|
|
115
|
-
* @returns {Promise<boolean>} - The state of the filter after execution.
|
|
116
|
-
*/
|
|
117
|
-
toggleEcho: (decay?: number, echoLength?: number) => Promise<boolean>;
|
|
118
|
-
};
|
|
119
|
-
lavalinkFilterPlugin: {
|
|
120
|
-
/**
|
|
121
|
-
* Enables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data)
|
|
122
|
-
* @param delay
|
|
123
|
-
* @param decay
|
|
124
|
-
* @returns
|
|
125
|
-
*/
|
|
126
|
-
toggleEcho: (delay?: number, decay?: number) => Promise<boolean>;
|
|
127
|
-
/**
|
|
128
|
-
* Enables / Disables the Echo effect, IMPORTANT! Only works with the correct Lavalink Plugin installed. (Optional: provide your Own Data)
|
|
129
|
-
* @param delays
|
|
130
|
-
* @param gains
|
|
131
|
-
* @returns
|
|
132
|
-
*/
|
|
133
|
-
toggleReverb: (delays?: number[], gains?: number[]) => Promise<boolean>;
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Enables / Disables a Nightcore-like filter Effect. Disables/Overrides both: custom and Vaporwave Filter
|
|
137
|
-
* @param speed
|
|
138
|
-
* @param pitch
|
|
139
|
-
* @param rate
|
|
140
|
-
* @returns
|
|
141
|
-
*/
|
|
142
|
-
toggleNightcore(speed?: number, pitch?: number, rate?: number): Promise<boolean>;
|
|
143
|
-
/**
|
|
144
|
-
* Enables / Disables a Vaporwave-like filter Effect. Disables/Overrides both: custom and nightcore Filter
|
|
145
|
-
* @param speed
|
|
146
|
-
* @param pitch
|
|
147
|
-
* @param rate
|
|
148
|
-
* @returns
|
|
149
|
-
*/
|
|
150
|
-
toggleVaporwave(speed?: number, pitch?: number, rate?: number): Promise<boolean>;
|
|
151
|
-
/**
|
|
152
|
-
* Enable / Disables a Karaoke like Filter Effect
|
|
153
|
-
* @param level
|
|
154
|
-
* @param monoLevel
|
|
155
|
-
* @param filterBand
|
|
156
|
-
* @param filterWidth
|
|
157
|
-
* @returns
|
|
158
|
-
*/
|
|
159
|
-
toggleKaraoke(level?: number, monoLevel?: number, filterBand?: number, filterWidth?: number): Promise<boolean>;
|
|
160
|
-
/** Function to find out if currently there is a custom timescamle etc. filter applied */
|
|
161
|
-
isCustomFilterActive(): boolean;
|
|
162
|
-
/**
|
|
163
|
-
* Sets the players equalizer band on-top of the existing ones.
|
|
164
|
-
* @param bands
|
|
165
|
-
*/
|
|
166
|
-
setEQ(bands: EQBand | EQBand[]): Promise<this>;
|
|
167
|
-
/** Clears the equalizer bands. */
|
|
168
|
-
clearEQ(): Promise<this>;
|
|
169
|
-
}
|