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,238 +0,0 @@
1
- import type internal from "stream";
2
- import type { LavalinkNode } from "../Node.js";
3
- import type { DestroyReasonsType } from "./Player.js";
4
- import type { InvalidLavalinkRestRequest, LavalinkPlayer } from "./Utils.js";
5
- import type { PluginInfo } from "./Track.js";
6
- /** Ability to manipulate fetch requests */
7
- export type ModifyRequest = (options: RequestInit & {
8
- path: string;
9
- extraQueryUrlParams?: URLSearchParams;
10
- }) => void;
11
- export type SponsorBlockSegment = "sponsor" | "selfpromo" | "interaction" | "intro" | "outro" | "preview" | "music_offtopic" | "filler";
12
- /**
13
- * Node Options for creating a lavalink node
14
- */
15
- export interface LavalinkNodeOptions {
16
- /** The Lavalink Server-Ip / Domain-URL */
17
- host: string;
18
- /** The Lavalink Connection Port */
19
- port: number;
20
- /** The Lavalink Password / Authorization-Key */
21
- authorization: string;
22
- /** Does the Server use ssl (https) */
23
- secure?: boolean;
24
- /** RESUME THE PLAYER? by providing a sessionid on the node-creation */
25
- sessionId?: string;
26
- /** Add a Custom ID to the node, for later use */
27
- id?: string;
28
- /** Voice Regions of this Node */
29
- regions?: string[];
30
- /** The retryAmount for the node. */
31
- retryAmount?: number;
32
- /** The retryDelay for the node. */
33
- retryDelay?: number;
34
- /** signal for cancelling requests - default: AbortSignal.timeout(options.requestSignalTimeoutMS || 10000) - put <= 0 to disable */
35
- requestSignalTimeoutMS?: number;
36
- /** Close on error */
37
- closeOnError?: boolean;
38
- /** Heartbeat interval , set to <= 0 to disable heartbeat system */
39
- heartBeatInterval?: 30000;
40
- /** Recommended, to check wether the client is still connected or not on the stats endpoint */
41
- enablePingOnStatsCheck?: boolean;
42
- }
43
- /**
44
- * Memory Stats object from lavalink
45
- */
46
- export interface MemoryStats {
47
- /** The free memory of the allocated amount. */
48
- free: number;
49
- /** The used memory of the allocated amount. */
50
- used: number;
51
- /** The total allocated memory. */
52
- allocated: number;
53
- /** The reservable memory. */
54
- reservable: number;
55
- }
56
- /**
57
- * CPU Stats object from lavalink
58
- */
59
- export interface CPUStats {
60
- /** The core amount the host machine has. */
61
- cores: number;
62
- /** The system load. */
63
- systemLoad: number;
64
- /** The lavalink load. */
65
- lavalinkLoad: number;
66
- }
67
- /**
68
- * FrameStats Object from lavalink
69
- */
70
- export interface FrameStats {
71
- /** The amount of sent frames. */
72
- sent?: number;
73
- /** The amount of nulled frames. */
74
- nulled?: number;
75
- /** The amount of deficit frames. */
76
- deficit?: number;
77
- }
78
- /**
79
- * BaseNodeStats object from Lavalink
80
- */
81
- export interface BaseNodeStats {
82
- /** The amount of players on the node. */
83
- players: number;
84
- /** The amount of playing players on the node. */
85
- playingPlayers: number;
86
- /** The uptime for the node. */
87
- uptime: number;
88
- /** The memory stats for the node. */
89
- memory: MemoryStats;
90
- /** The cpu stats for the node. */
91
- cpu: CPUStats;
92
- /** The frame stats for the node. */
93
- frameStats: FrameStats;
94
- }
95
- /**
96
- * Interface for nodeStats from lavalink
97
- */
98
- export interface NodeStats extends BaseNodeStats {
99
- /** The frame stats for the node. */
100
- frameStats: FrameStats;
101
- }
102
- /**
103
- * Entire lavalink information object from lavalink
104
- */
105
- export interface LavalinkInfo {
106
- /** The version of this Lavalink server */
107
- version: VersionObject;
108
- /** The millisecond unix timestamp when this Lavalink jar was built */
109
- buildTime: number;
110
- /** The git information of this Lavalink server */
111
- git: GitObject;
112
- /** The JVM version this Lavalink server runs on */
113
- jvm: string;
114
- /** The Lavaplayer version being used by this server */
115
- lavaplayer: string;
116
- /** The enabled source managers for this server */
117
- sourceManagers: string[];
118
- /** The enabled filters for this server */
119
- filters: string[];
120
- /** The enabled plugins for this server */
121
- plugins: PluginObject[];
122
- }
123
- /**
124
- * Lavalink's version object from lavalink
125
- */
126
- export interface VersionObject {
127
- /** The full version string of this Lavalink server */
128
- semver: string;
129
- /** The major version of this Lavalink server */
130
- major: number;
131
- /** The minor version of this Lavalink server */
132
- minor: number;
133
- /** The patch version of this Lavalink server */
134
- patch: internal;
135
- /** The pre-release version according to semver as a . separated list of identifiers */
136
- preRelease?: string;
137
- /** The build metadata according to semver as a . separated list of identifiers */
138
- build?: string;
139
- }
140
- /**
141
- * Git information object from lavalink
142
- */
143
- export interface GitObject {
144
- /** The branch this Lavalink server was built on */
145
- branch: string;
146
- /** The commit this Lavalink server was built on */
147
- commit: string;
148
- /** The millisecond unix timestamp for when the commit was created */
149
- commitTime: string;
150
- }
151
- /**
152
- * Lavalink's plugins object from lavalink's plugin
153
- */
154
- export interface PluginObject {
155
- /** The name of the plugin */
156
- name: string;
157
- /** The version of the plugin */
158
- version: string;
159
- }
160
- export interface LyricsResult {
161
- /**The name of the source */
162
- sourceName: string;
163
- /**The name of the provider */
164
- provider: string;
165
- /**The result text */
166
- text: string | null;
167
- /**The lyrics lines */
168
- lines: LyricsLine[];
169
- /**Information about the plugin */
170
- plugin: PluginInfo;
171
- }
172
- export interface LyricsLine {
173
- /**The millisecond timestamp */
174
- timestamp: number;
175
- /**The line duration in milliseconds */
176
- duration: number | null;
177
- /**The line text */
178
- line: string;
179
- /**Information about the plugin */
180
- plugin: PluginInfo;
181
- }
182
- export type LavalinkNodeIdentifier = string;
183
- export interface NodeManagerEvents {
184
- /**
185
- * Emitted when a Node is created.
186
- * @event Manager.nodeManager#create
187
- */
188
- "create": (node: LavalinkNode) => void;
189
- /**
190
- * Emitted when a Node is destroyed.
191
- * @event Manager.nodeManager#destroy
192
- */
193
- "destroy": (node: LavalinkNode, destroyReason?: DestroyReasonsType) => void;
194
- /**
195
- * Emitted when a Node is connected.
196
- * @event Manager.nodeManager#connect
197
- */
198
- "connect": (node: LavalinkNode) => void;
199
- /**
200
- * Emitted when a Node is reconnecting.
201
- * @event Manager.nodeManager#reconnecting
202
- */
203
- "reconnecting": (node: LavalinkNode) => void;
204
- /**
205
- * Emitted When a node starts to reconnect (if you have a reconnection delay, the reconnecting event will be emitted after the retryDelay.)
206
- * Useful to check wether the internal node reconnect system works or not
207
- * @event Manager.nodeManager#reconnectinprogress
208
- */
209
- "reconnectinprogress": (node: LavalinkNode) => void;
210
- /**
211
- * Emitted when a Node is disconnects.
212
- * @event Manager.nodeManager#disconnect
213
- */
214
- "disconnect": (node: LavalinkNode, reason: {
215
- code?: number;
216
- reason?: string;
217
- }) => void;
218
- /**
219
- * Emitted when a Node is error.
220
- * @event Manager.nodeManager#error
221
- */
222
- "error": (node: LavalinkNode, error: Error, payload?: unknown) => void;
223
- /**
224
- * Emits every single Node event.
225
- * @event Manager.nodeManager#raw
226
- */
227
- "raw": (node: LavalinkNode, payload: unknown) => void;
228
- /**
229
- * Emits when the node connects resumed. You then need to create all players within this event for your usecase.
230
- * Aka for that you need to be able to save player data like vc channel + text channel in a db and then sync it again
231
- * @event Manager.nodeManager#nodeResumed
232
- */
233
- "resumed": (node: LavalinkNode, payload: {
234
- resumed: true;
235
- sessionId: string;
236
- op: "ready";
237
- }, players: LavalinkPlayer[] | InvalidLavalinkRestRequest) => void;
238
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,114 +0,0 @@
1
- import type { DestroyReasons, DisconnectReasons } from "../Constants.js";
2
- import type { LavalinkNode } from "../Node.js";
3
- import type { EQBand, FilterData, LavalinkFilterData } from "./Filters.js";
4
- import type { StoredQueue } from "./Queue.js";
5
- import type { Track, UnresolvedTrack } from "./Track.js";
6
- import type { Base64, LavalinkPlayerVoiceOptions } from "./Utils.js";
7
- export type DestroyReasonsType = keyof typeof DestroyReasons | string;
8
- export type DisconnectReasonsType = keyof typeof DisconnectReasons | string;
9
- export interface PlayerJson {
10
- /** Guild Id where the player was playing in */
11
- guildId: string;
12
- /** Options provided to the player */
13
- options: PlayerOptions;
14
- /** Voice Channel Id the player was playing in */
15
- voiceChannelId: string;
16
- /** Text Channel Id the player was synced to */
17
- textChannelId?: string;
18
- /** Position the player was at */
19
- position: number;
20
- /** Lavalink's position the player was at */
21
- lastPosition: number;
22
- /** Last time the position was sent from lavalink */
23
- lastPositionChange: number;
24
- /** Volume in % from the player (without volumeDecrementer) */
25
- volume: number;
26
- /** Real Volume used in lavalink (with the volumeDecrementer) */
27
- lavalinkVolume: number;
28
- /** The repeatmode from the player */
29
- repeatMode: RepeatMode;
30
- /** Pause state */
31
- paused: boolean;
32
- /** Wether the player was playing or not */
33
- playing: boolean;
34
- /** When the player was created */
35
- createdTimeStamp?: number;
36
- /** All current used fitlers Data */
37
- filters: FilterData;
38
- /** The player's ping object */
39
- ping: {
40
- /** Ping to the voice websocket server */
41
- ws: number;
42
- /** Avg. calc. Ping to the lavalink server */
43
- lavalink: number;
44
- };
45
- /** Equalizer Bands used in lavalink */
46
- equalizer: EQBand[];
47
- /** The Id of the last used node */
48
- nodeId?: string;
49
- /** The SessionId of the node */
50
- nodeSessionId?: string;
51
- /** The stored queue */
52
- queue?: StoredQueue;
53
- }
54
- export type RepeatMode = "queue" | "track" | "off";
55
- export interface PlayerOptions {
56
- /** Guild id of the player */
57
- guildId: string;
58
- /** The Voice Channel Id */
59
- voiceChannelId: string;
60
- /** The Text Channel Id of the Player */
61
- textChannelId?: string;
62
- /** instantly change volume with the one play request */
63
- volume?: number;
64
- /** VC Region for node selections */
65
- vcRegion?: string;
66
- /** if it should join deafened */
67
- selfDeaf?: boolean;
68
- /** If it should join muted */
69
- selfMute?: boolean;
70
- /** If it should use a specific lavalink node */
71
- node?: LavalinkNode | string;
72
- /** If when applying filters, it should use the insta apply filters fix */
73
- instaUpdateFiltersFix?: boolean;
74
- /** If a volume should be applied via filters instead of lavalink-volume */
75
- applyVolumeAsFilter?: boolean;
76
- /** Custom Data for the player get/set datastorage */
77
- customData?: anyObject;
78
- }
79
- export type anyObject = {
80
- [key: string | number]: string | number | null | anyObject;
81
- };
82
- export interface BasePlayOptions {
83
- /** The position to start the track. */
84
- position?: number;
85
- /** The position to end the track. */
86
- endTime?: number;
87
- /** If to start "paused" */
88
- paused?: boolean;
89
- /** The Volume to start with */
90
- volume?: number;
91
- /** The Lavalink Filters to use | only with the new REST API */
92
- filters?: Partial<LavalinkFilterData>;
93
- /** Voice Update for Lavalink */
94
- voice?: LavalinkPlayerVoiceOptions;
95
- }
96
- export interface LavalinkPlayOptions extends BasePlayOptions {
97
- /** Which Track to play | don't provide, if it should pick from the Queue */
98
- track?: {
99
- /** The track encoded base64 string to use instead of the one from the queue system */
100
- encoded?: Base64 | null;
101
- /** The identifier of the track to use */
102
- identifier?: string;
103
- /** Custom User Data for the track to provide, will then be on the userData object from the track */
104
- userData?: anyObject;
105
- /** The Track requester for when u provide encodedTrack / identifer */
106
- requester?: unknown;
107
- };
108
- }
109
- export interface PlayOptions extends LavalinkPlayOptions {
110
- /** Whether to not replace the track if a play payload is sent. */
111
- noReplace?: boolean;
112
- /** Adds track on queue and skips to it */
113
- clientTrack?: Track | UnresolvedTrack;
114
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,34 +0,0 @@
1
- import type { Track, UnresolvedTrack } from "./Track.js";
2
- export interface StoredQueue {
3
- current: Track | null;
4
- previous: Track[];
5
- tracks: (Track | UnresolvedTrack)[];
6
- }
7
- export interface QueueStoreManager {
8
- /** @async get a Value (MUST RETURN UNPARSED!) */
9
- get: (guildId: string) => Promise<StoredQueue | string>;
10
- /** @async Set a value inside a guildId (MUST BE UNPARSED) */
11
- set: (guildId: string, value: StoredQueue | string) => Promise<void | boolean>;
12
- /** @async Delete a Database Value based of it's guildId */
13
- delete: (guildId: string) => Promise<void | boolean>;
14
- /** @async Transform the value(s) inside of the QueueStoreManager (IF YOU DON'T NEED PARSING/STRINGIFY, then just return the value) */
15
- stringify: (value: StoredQueue | string) => Promise<StoredQueue | string>;
16
- /** @async Parse the saved value back to the Queue (IF YOU DON'T NEED PARSING/STRINGIFY, then just return the value) */
17
- parse: (value: StoredQueue | string) => Promise<Partial<StoredQueue>>;
18
- }
19
- export interface ManagerQueueOptions {
20
- /** Maximum Amount of tracks for the queue.previous array. Set to 0 to not save previous songs. Defaults to 25 Tracks */
21
- maxPreviousTracks?: number;
22
- /** Custom Queue Store option */
23
- queueStore?: QueueStoreManager;
24
- /** Custom Queue Watcher class */
25
- queueChangesWatcher?: QueueChangesWatcher;
26
- }
27
- export interface QueueChangesWatcher {
28
- /** get a Value (MUST RETURN UNPARSED!) */
29
- tracksAdd: (guildId: string, tracks: (Track | UnresolvedTrack)[], position: number, oldStoredQueue: StoredQueue, newStoredQueue: StoredQueue) => void;
30
- /** Set a value inside a guildId (MUST BE UNPARSED) */
31
- tracksRemoved: (guildId: string, tracks: (Track | UnresolvedTrack)[], position: number | number[], oldStoredQueue: StoredQueue, newStoredQueue: StoredQueue) => void;
32
- /** Set a value inside a guildId (MUST BE UNPARSED) */
33
- shuffled: (guildId: string, oldStoredQueue: StoredQueue, newStoredQueue: StoredQueue) => void;
34
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,134 +0,0 @@
1
- import type { Player } from "../Player.js";
2
- import type { anyObject } from "./Player.js";
3
- import type { Base64 } from "./Utils.js";
4
- /** Sourcenames provided by lavalink server */
5
- export type LavalinkSourceNames = "youtube" | "youtubemusic" | "soundcloud" | "bandcamp" | "twitch";
6
- /** Source Names provided by lava src plugin */
7
- export type LavalinkPlugin_LavaSrc_SourceNames = "deezer" | "spotify" | "applemusic" | "yandexmusic" | "flowery-tts" | "vkmusic" | "tidal" | "qobuz";
8
- /** Source Names provided by jiosaavan plugin */
9
- export type LavalinkPlugin_JioSaavn_SourceNames = "jiosaavn";
10
- /** The SourceNames provided by lavalink */
11
- export type SourceNames = LavalinkSourceNames | LavalinkPlugin_LavaSrc_SourceNames | LavalinkPlugin_JioSaavn_SourceNames;
12
- export interface LavalinkTrackInfo {
13
- /** The Identifier of the Track */
14
- identifier: string;
15
- /** The Track Title / Name */
16
- title: string;
17
- /** The Name of the Author */
18
- author: string;
19
- /** The duration of the Track */
20
- length: number;
21
- /** The URL of the artwork if available */
22
- artworkUrl: string | null;
23
- /** The URL (aka Link) of the Track called URI */
24
- uri: string;
25
- /** The Source name of the Track, e.g. soundcloud, youtube, spotify */
26
- sourceName: SourceNames;
27
- /** Wether the audio is seekable */
28
- isSeekable: boolean;
29
- /** Wether the audio is of a live stream */
30
- isStream: boolean;
31
- /** If isrc code is available, it's provided */
32
- isrc: string | null;
33
- }
34
- export interface TrackInfo {
35
- /** The Identifier of the Track */
36
- identifier: string;
37
- /** The Track Title / Name */
38
- title: string;
39
- /** The Name of the Author */
40
- author: string;
41
- /** The duration of the Track */
42
- duration: number;
43
- /** The URL of the artwork if available */
44
- artworkUrl: string | null;
45
- /** The URL (aka Link) of the Track called URI */
46
- uri: string;
47
- /** The Source name of the Track, e.g. soundcloud, youtube, spotify */
48
- sourceName: SourceNames;
49
- /** Wether the audio is seekable */
50
- isSeekable: boolean;
51
- /** Wether the audio is of a live stream */
52
- isStream: boolean;
53
- /** If isrc code is available, it's provided */
54
- isrc: string | null;
55
- }
56
- export interface PluginInfo {
57
- /** The Type provided by a plugin */
58
- type?: "album" | "playlist" | "artist" | "recommendations" | string;
59
- /** The Identifier provided by a plugin */
60
- albumName?: string;
61
- /** The url of the album */
62
- albumUrl?: string;
63
- /** The url of the album art */
64
- albumArtUrl?: string;
65
- /** The url of the artist */
66
- artistUrl?: string;
67
- /** The url of the artist artwork */
68
- artistArtworkUrl?: string;
69
- /** The url of the preview */
70
- previewUrl?: string;
71
- /** Whether the track is a preview */
72
- isPreview?: boolean;
73
- /** The total number of tracks in the playlist */
74
- totalTracks?: number;
75
- /** The Identifier provided by a plugin */
76
- identifier?: string;
77
- /** The ArtworkUrl provided by a plugin */
78
- artworkUrl?: string;
79
- /** The Author Information provided by a plugin */
80
- author?: string;
81
- /** The Url provided by a Plugin */
82
- url?: string;
83
- /** The Url provided by a Plugin */
84
- uri?: string;
85
- /** You can put specific track information here, to transform the tracks... */
86
- clientData?: {
87
- previousTrack?: boolean;
88
- [key: string]: any;
89
- };
90
- }
91
- export interface LavalinkTrack {
92
- /** The Base 64 encoded String */
93
- encoded?: Base64;
94
- /** Track Information */
95
- info: LavalinkTrackInfo;
96
- /** Plugin Information from Lavalink */
97
- pluginInfo: Partial<PluginInfo>;
98
- /** The userData Object from when you provide to the lavalink request */
99
- userData?: anyObject;
100
- }
101
- export interface Track {
102
- /** The Base 64 encoded String */
103
- encoded?: Base64;
104
- /** Track Information */
105
- info: TrackInfo;
106
- /** Plugin Information from Lavalink */
107
- pluginInfo: Partial<PluginInfo>;
108
- /** The Track's Requester */
109
- requester?: unknown;
110
- /** The userData Object from when you provide to the lavalink request */
111
- userData?: anyObject;
112
- }
113
- export interface UnresolvedTrackInfo extends Partial<TrackInfo> {
114
- /** Required */
115
- title: string;
116
- }
117
- export interface UnresolvedQuery extends UnresolvedTrackInfo {
118
- /** The base64 of the unresolved track to "encode" */
119
- encoded?: Base64;
120
- }
121
- export interface UnresolvedTrack {
122
- /** Required */
123
- resolve: (player: Player) => Promise<void>;
124
- /** The Base 64 encoded String */
125
- encoded?: Base64;
126
- /** Track Information */
127
- info: UnresolvedTrackInfo;
128
- /** Plugin Information from Lavalink */
129
- pluginInfo: Partial<PluginInfo>;
130
- /** The userData Object from when you provide to the lavalink request */
131
- userData?: anyObject;
132
- /** The Track's Requester */
133
- requester?: unknown;
134
- }
@@ -1 +0,0 @@
1
- export {};