distube 5.1.2 → 5.2.1
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/dist/index.d.mts +61 -7
- package/dist/index.d.ts +61 -7
- package/dist/index.js +143 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +133 -52
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -13
package/dist/index.d.mts
CHANGED
|
@@ -308,7 +308,26 @@ type FFmpegOptions = {
|
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
declare const version: string;
|
|
311
|
-
|
|
311
|
+
/**
|
|
312
|
+
* Audio configuration constants
|
|
313
|
+
*/
|
|
314
|
+
declare const AUDIO_SAMPLE_RATE = 48000;
|
|
315
|
+
declare const AUDIO_CHANNELS = 2;
|
|
316
|
+
/**
|
|
317
|
+
* Default volume percentage (0-100)
|
|
318
|
+
*/
|
|
319
|
+
declare const DEFAULT_VOLUME = 50;
|
|
320
|
+
/**
|
|
321
|
+
* Timeout constants (in milliseconds)
|
|
322
|
+
*/
|
|
323
|
+
declare const JOIN_TIMEOUT_MS = 30000;
|
|
324
|
+
declare const RECONNECT_TIMEOUT_MS = 5000;
|
|
325
|
+
declare const RECONNECT_MAX_ATTEMPTS = 5;
|
|
326
|
+
/**
|
|
327
|
+
* HTTP redirect status codes
|
|
328
|
+
*/
|
|
329
|
+
declare const HTTP_REDIRECT_CODES: Set<number>;
|
|
330
|
+
declare const MAX_REDIRECT_DEPTH = 5;
|
|
312
331
|
/**
|
|
313
332
|
* Default DisTube audio filters.
|
|
314
333
|
*/
|
|
@@ -567,6 +586,10 @@ declare class DisTubeStream extends TypedEmitter<{
|
|
|
567
586
|
process?: ChildProcess;
|
|
568
587
|
stream: VolumeTransformer;
|
|
569
588
|
audioResource: AudioResource;
|
|
589
|
+
/**
|
|
590
|
+
* The seek time in seconds that this stream started from
|
|
591
|
+
*/
|
|
592
|
+
readonly seekTime: number;
|
|
570
593
|
/**
|
|
571
594
|
* Create a DisTubeStream to play with {@link DisTubeVoice}
|
|
572
595
|
* @param url - Stream URL
|
|
@@ -632,9 +655,13 @@ declare class DisTubeVoice extends TypedEmitter<DisTubeVoiceEvents> {
|
|
|
632
655
|
*/
|
|
633
656
|
get volume(): number;
|
|
634
657
|
/**
|
|
635
|
-
* Playback duration of the audio resource in seconds
|
|
658
|
+
* Playback duration of the audio resource in seconds (time since playback started)
|
|
636
659
|
*/
|
|
637
660
|
get playbackDuration(): number;
|
|
661
|
+
/**
|
|
662
|
+
* Current playback time in seconds, accounting for seek offset
|
|
663
|
+
*/
|
|
664
|
+
get playbackTime(): number;
|
|
638
665
|
pause(): void;
|
|
639
666
|
unpause(): void;
|
|
640
667
|
/**
|
|
@@ -829,7 +856,10 @@ declare class Queue extends DisTubeBase {
|
|
|
829
856
|
*/
|
|
830
857
|
stopped: boolean;
|
|
831
858
|
/**
|
|
832
|
-
* Whether or not the
|
|
859
|
+
* Whether or not the queue is active.
|
|
860
|
+
*
|
|
861
|
+
* Note: This remains `true` when paused. It only becomes `false` when stopped.
|
|
862
|
+
* @deprecated Use `!queue.paused` to check if audio is playing. Will be removed in v6.0.
|
|
833
863
|
*/
|
|
834
864
|
playing: boolean;
|
|
835
865
|
/**
|
|
@@ -856,18 +886,22 @@ declare class Queue extends DisTubeBase {
|
|
|
856
886
|
textChannel?: GuildTextBasedChannel;
|
|
857
887
|
/**
|
|
858
888
|
* What time in the song to begin (in seconds).
|
|
889
|
+
* @internal
|
|
859
890
|
*/
|
|
860
891
|
_beginTime: number;
|
|
861
892
|
/**
|
|
862
893
|
* Whether or not the queue is being updated manually (skip, jump, previous)
|
|
894
|
+
* @internal
|
|
863
895
|
*/
|
|
864
896
|
_manualUpdate: boolean;
|
|
865
897
|
/**
|
|
866
898
|
* Task queuing system
|
|
899
|
+
* @internal
|
|
867
900
|
*/
|
|
868
901
|
_taskQueue: TaskQueue;
|
|
869
902
|
/**
|
|
870
903
|
* {@link DisTubeVoice} listener
|
|
904
|
+
* @internal
|
|
871
905
|
*/
|
|
872
906
|
_listeners?: DisTubeVoiceEvents;
|
|
873
907
|
/**
|
|
@@ -918,11 +952,13 @@ declare class Queue extends DisTubeBase {
|
|
|
918
952
|
*/
|
|
919
953
|
addToQueue(song: Song | Song[], position?: number): Queue;
|
|
920
954
|
/**
|
|
921
|
-
* @returns `true` if the queue is
|
|
955
|
+
* @returns `true` if the queue is active (not stopped)
|
|
956
|
+
* @deprecated Use `!queue.paused` to check if audio is playing. Will be removed in v6.0.
|
|
922
957
|
*/
|
|
923
958
|
isPlaying(): boolean;
|
|
924
959
|
/**
|
|
925
960
|
* @returns `true` if the queue is paused
|
|
961
|
+
* @deprecated Use `queue.paused` property instead. Will be removed in v6.0.
|
|
926
962
|
*/
|
|
927
963
|
isPaused(): boolean;
|
|
928
964
|
/**
|
|
@@ -980,7 +1016,13 @@ declare class Queue extends DisTubeBase {
|
|
|
980
1016
|
* @param time - Time in seconds
|
|
981
1017
|
* @returns The guild queue
|
|
982
1018
|
*/
|
|
983
|
-
seek(time: number): Queue
|
|
1019
|
+
seek(time: number): Promise<Queue>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Internal implementation of addRelatedSong without task queue protection.
|
|
1022
|
+
* Used by methods that already hold the task queue lock.
|
|
1023
|
+
* @internal
|
|
1024
|
+
*/
|
|
1025
|
+
_addRelatedSong(song?: Song): Promise<Song>;
|
|
984
1026
|
/**
|
|
985
1027
|
* Add a related song of the playing song to the queue
|
|
986
1028
|
* @param song - The song to get related songs from. Defaults to the current playing song.
|
|
@@ -1160,17 +1202,20 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1160
1202
|
* Pause the guild stream
|
|
1161
1203
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1162
1204
|
* @returns The guild queue
|
|
1205
|
+
* @deprecated Use `distube.getQueue(guild).pause()` instead. Will be removed in v6.0.
|
|
1163
1206
|
*/
|
|
1164
1207
|
pause(guild: GuildIdResolvable): Promise<Queue>;
|
|
1165
1208
|
/**
|
|
1166
1209
|
* Resume the guild stream
|
|
1167
1210
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1168
1211
|
* @returns The guild queue
|
|
1212
|
+
* @deprecated Use `distube.getQueue(guild).resume()` instead. Will be removed in v6.0.
|
|
1169
1213
|
*/
|
|
1170
1214
|
resume(guild: GuildIdResolvable): Promise<Queue>;
|
|
1171
1215
|
/**
|
|
1172
1216
|
* Stop the guild stream
|
|
1173
1217
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1218
|
+
* @deprecated Use `distube.getQueue(guild).stop()` instead. Will be removed in v6.0.
|
|
1174
1219
|
*/
|
|
1175
1220
|
stop(guild: GuildIdResolvable): Promise<void>;
|
|
1176
1221
|
/**
|
|
@@ -1178,6 +1223,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1178
1223
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1179
1224
|
* @param percent - The percentage of volume you want to set
|
|
1180
1225
|
* @returns The guild queue
|
|
1226
|
+
* @deprecated Use `distube.getQueue(guild).setVolume(percent)` instead. Will be removed in v6.0.
|
|
1181
1227
|
*/
|
|
1182
1228
|
setVolume(guild: GuildIdResolvable, percent: number): Queue;
|
|
1183
1229
|
/**
|
|
@@ -1186,18 +1232,21 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1186
1232
|
* play a related song.</info>
|
|
1187
1233
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1188
1234
|
* @returns The new Song will be played
|
|
1235
|
+
* @deprecated Use `distube.getQueue(guild).skip(options)` instead. Will be removed in v6.0.
|
|
1189
1236
|
*/
|
|
1190
1237
|
skip(guild: GuildIdResolvable, options?: JumpOptions): Promise<Song>;
|
|
1191
1238
|
/**
|
|
1192
1239
|
* Play the previous song
|
|
1193
1240
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1194
1241
|
* @returns The new Song will be played
|
|
1242
|
+
* @deprecated Use `distube.getQueue(guild).previous()` instead. Will be removed in v6.0.
|
|
1195
1243
|
*/
|
|
1196
1244
|
previous(guild: GuildIdResolvable): Promise<Song>;
|
|
1197
1245
|
/**
|
|
1198
1246
|
* Shuffle the guild queue songs
|
|
1199
1247
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1200
1248
|
* @returns The guild queue
|
|
1249
|
+
* @deprecated Use `distube.getQueue(guild).shuffle()` instead. Will be removed in v6.0.
|
|
1201
1250
|
*/
|
|
1202
1251
|
shuffle(guild: GuildIdResolvable): Promise<Queue>;
|
|
1203
1252
|
/**
|
|
@@ -1206,6 +1255,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1206
1255
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1207
1256
|
* @param num - The song number to play
|
|
1208
1257
|
* @returns The new Song will be played
|
|
1258
|
+
* @deprecated Use `distube.getQueue(guild).jump(num, options)` instead. Will be removed in v6.0.
|
|
1209
1259
|
*/
|
|
1210
1260
|
jump(guild: GuildIdResolvable, num: number, options?: JumpOptions): Promise<Song>;
|
|
1211
1261
|
/**
|
|
@@ -1214,18 +1264,21 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1214
1264
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1215
1265
|
* @param mode - The repeat modes (toggle if `undefined`)
|
|
1216
1266
|
* @returns The new repeat mode
|
|
1267
|
+
* @deprecated Use `distube.getQueue(guild).setRepeatMode(mode)` instead. Will be removed in v6.0.
|
|
1217
1268
|
*/
|
|
1218
1269
|
setRepeatMode(guild: GuildIdResolvable, mode?: RepeatMode): RepeatMode;
|
|
1219
1270
|
/**
|
|
1220
1271
|
* Toggle autoplay mode
|
|
1221
1272
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1222
1273
|
* @returns Autoplay mode state
|
|
1274
|
+
* @deprecated Use `distube.getQueue(guild).toggleAutoplay()` instead. Will be removed in v6.0.
|
|
1223
1275
|
*/
|
|
1224
1276
|
toggleAutoplay(guild: GuildIdResolvable): boolean;
|
|
1225
1277
|
/**
|
|
1226
1278
|
* Add related song to the queue
|
|
1227
1279
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1228
1280
|
* @returns The guild queue
|
|
1281
|
+
* @deprecated Use `distube.getQueue(guild).addRelatedSong()` instead. Will be removed in v6.0.
|
|
1229
1282
|
*/
|
|
1230
1283
|
addRelatedSong(guild: GuildIdResolvable): Promise<Song>;
|
|
1231
1284
|
/**
|
|
@@ -1233,8 +1286,9 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1233
1286
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1234
1287
|
* @param time - Time in seconds
|
|
1235
1288
|
* @returns Seeked queue
|
|
1289
|
+
* @deprecated Use `distube.getQueue(guild).seek(time)` instead. Will be removed in v6.0.
|
|
1236
1290
|
*/
|
|
1237
|
-
seek(guild: GuildIdResolvable, time: number): Queue
|
|
1291
|
+
seek(guild: GuildIdResolvable, time: number): Promise<Queue>;
|
|
1238
1292
|
/**
|
|
1239
1293
|
* Emit error event
|
|
1240
1294
|
* @param error - error
|
|
@@ -1496,4 +1550,4 @@ type Falsy = undefined | null | false | 0 | "";
|
|
|
1496
1550
|
declare const isTruthy: <T>(x: T | Falsy) => x is T;
|
|
1497
1551
|
declare const checkEncryptionLibraries: () => Promise<boolean>;
|
|
1498
1552
|
|
|
1499
|
-
export { type Awaitable, BaseManager, type CustomPlaylistOptions, DisTube, DisTubeBase, DisTubeError, type DisTubeEvents, DisTubeHandler, type DisTubeOptions, type DisTubePlugin, DisTubeStream, DisTubeVoice, type DisTubeVoiceEvents, DisTubeVoiceManager, Events, ExtractorPlugin, type FFmpegArg, type FFmpegArgs, type FFmpegOptions, type Falsy, type Filter, FilterManager, type FilterResolvable, type Filters, GuildIdManager, type GuildIdResolvable, InfoExtractorPlugin, type JumpOptions, type KeyOf, Options, type PlayHandlerOptions, type PlayOptions, PlayableExtractorPlugin, Playlist, type PlaylistInfo, Plugin, PluginType, Queue, QueueManager, type RelatedSong, RepeatMode, type ResolveOptions, type ResolvePlaylistOptions, Song, type SongInfo, type StreamOptions, TaskQueue, type TypedDisTubeEvents, checkEncryptionLibraries, checkFFmpeg, checkIntents, checkInvalidKey, DisTube as default, defaultFilters, defaultOptions, formatDuration, isClientInstance, isGuildInstance, isMemberInstance, isMessageInstance, isNsfwChannel, isObject, isSnowflake, isSupportedVoiceChannel, isTextChannelInstance, isTruthy, isURL, isVoiceChannelEmpty, objectKeys, resolveGuildId, version };
|
|
1553
|
+
export { AUDIO_CHANNELS, AUDIO_SAMPLE_RATE, type Awaitable, BaseManager, type CustomPlaylistOptions, DEFAULT_VOLUME, DisTube, DisTubeBase, DisTubeError, type DisTubeEvents, DisTubeHandler, type DisTubeOptions, type DisTubePlugin, DisTubeStream, DisTubeVoice, type DisTubeVoiceEvents, DisTubeVoiceManager, Events, ExtractorPlugin, type FFmpegArg, type FFmpegArgs, type FFmpegOptions, type Falsy, type Filter, FilterManager, type FilterResolvable, type Filters, GuildIdManager, type GuildIdResolvable, HTTP_REDIRECT_CODES, InfoExtractorPlugin, InfoExtractorPlugin as InfoExtratorPlugin, JOIN_TIMEOUT_MS, type JumpOptions, type KeyOf, MAX_REDIRECT_DEPTH, Options, type PlayHandlerOptions, type PlayOptions, PlayableExtractorPlugin, PlayableExtractorPlugin as PlayableExtratorPlugin, Playlist, type PlaylistInfo, Plugin, PluginType, Queue, QueueManager, RECONNECT_MAX_ATTEMPTS, RECONNECT_TIMEOUT_MS, type RelatedSong, RepeatMode, type ResolveOptions, type ResolvePlaylistOptions, Song, type SongInfo, type StreamOptions, TaskQueue, type TypedDisTubeEvents, checkEncryptionLibraries, checkFFmpeg, checkIntents, checkInvalidKey, DisTube as default, defaultFilters, defaultOptions, formatDuration, isClientInstance, isGuildInstance, isMemberInstance, isMessageInstance, isNsfwChannel, isObject, isSnowflake, isSupportedVoiceChannel, isTextChannelInstance, isTruthy, isURL, isVoiceChannelEmpty, objectKeys, resolveGuildId, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -308,7 +308,26 @@ type FFmpegOptions = {
|
|
|
308
308
|
};
|
|
309
309
|
|
|
310
310
|
declare const version: string;
|
|
311
|
-
|
|
311
|
+
/**
|
|
312
|
+
* Audio configuration constants
|
|
313
|
+
*/
|
|
314
|
+
declare const AUDIO_SAMPLE_RATE = 48000;
|
|
315
|
+
declare const AUDIO_CHANNELS = 2;
|
|
316
|
+
/**
|
|
317
|
+
* Default volume percentage (0-100)
|
|
318
|
+
*/
|
|
319
|
+
declare const DEFAULT_VOLUME = 50;
|
|
320
|
+
/**
|
|
321
|
+
* Timeout constants (in milliseconds)
|
|
322
|
+
*/
|
|
323
|
+
declare const JOIN_TIMEOUT_MS = 30000;
|
|
324
|
+
declare const RECONNECT_TIMEOUT_MS = 5000;
|
|
325
|
+
declare const RECONNECT_MAX_ATTEMPTS = 5;
|
|
326
|
+
/**
|
|
327
|
+
* HTTP redirect status codes
|
|
328
|
+
*/
|
|
329
|
+
declare const HTTP_REDIRECT_CODES: Set<number>;
|
|
330
|
+
declare const MAX_REDIRECT_DEPTH = 5;
|
|
312
331
|
/**
|
|
313
332
|
* Default DisTube audio filters.
|
|
314
333
|
*/
|
|
@@ -567,6 +586,10 @@ declare class DisTubeStream extends TypedEmitter<{
|
|
|
567
586
|
process?: ChildProcess;
|
|
568
587
|
stream: VolumeTransformer;
|
|
569
588
|
audioResource: AudioResource;
|
|
589
|
+
/**
|
|
590
|
+
* The seek time in seconds that this stream started from
|
|
591
|
+
*/
|
|
592
|
+
readonly seekTime: number;
|
|
570
593
|
/**
|
|
571
594
|
* Create a DisTubeStream to play with {@link DisTubeVoice}
|
|
572
595
|
* @param url - Stream URL
|
|
@@ -632,9 +655,13 @@ declare class DisTubeVoice extends TypedEmitter<DisTubeVoiceEvents> {
|
|
|
632
655
|
*/
|
|
633
656
|
get volume(): number;
|
|
634
657
|
/**
|
|
635
|
-
* Playback duration of the audio resource in seconds
|
|
658
|
+
* Playback duration of the audio resource in seconds (time since playback started)
|
|
636
659
|
*/
|
|
637
660
|
get playbackDuration(): number;
|
|
661
|
+
/**
|
|
662
|
+
* Current playback time in seconds, accounting for seek offset
|
|
663
|
+
*/
|
|
664
|
+
get playbackTime(): number;
|
|
638
665
|
pause(): void;
|
|
639
666
|
unpause(): void;
|
|
640
667
|
/**
|
|
@@ -829,7 +856,10 @@ declare class Queue extends DisTubeBase {
|
|
|
829
856
|
*/
|
|
830
857
|
stopped: boolean;
|
|
831
858
|
/**
|
|
832
|
-
* Whether or not the
|
|
859
|
+
* Whether or not the queue is active.
|
|
860
|
+
*
|
|
861
|
+
* Note: This remains `true` when paused. It only becomes `false` when stopped.
|
|
862
|
+
* @deprecated Use `!queue.paused` to check if audio is playing. Will be removed in v6.0.
|
|
833
863
|
*/
|
|
834
864
|
playing: boolean;
|
|
835
865
|
/**
|
|
@@ -856,18 +886,22 @@ declare class Queue extends DisTubeBase {
|
|
|
856
886
|
textChannel?: GuildTextBasedChannel;
|
|
857
887
|
/**
|
|
858
888
|
* What time in the song to begin (in seconds).
|
|
889
|
+
* @internal
|
|
859
890
|
*/
|
|
860
891
|
_beginTime: number;
|
|
861
892
|
/**
|
|
862
893
|
* Whether or not the queue is being updated manually (skip, jump, previous)
|
|
894
|
+
* @internal
|
|
863
895
|
*/
|
|
864
896
|
_manualUpdate: boolean;
|
|
865
897
|
/**
|
|
866
898
|
* Task queuing system
|
|
899
|
+
* @internal
|
|
867
900
|
*/
|
|
868
901
|
_taskQueue: TaskQueue;
|
|
869
902
|
/**
|
|
870
903
|
* {@link DisTubeVoice} listener
|
|
904
|
+
* @internal
|
|
871
905
|
*/
|
|
872
906
|
_listeners?: DisTubeVoiceEvents;
|
|
873
907
|
/**
|
|
@@ -918,11 +952,13 @@ declare class Queue extends DisTubeBase {
|
|
|
918
952
|
*/
|
|
919
953
|
addToQueue(song: Song | Song[], position?: number): Queue;
|
|
920
954
|
/**
|
|
921
|
-
* @returns `true` if the queue is
|
|
955
|
+
* @returns `true` if the queue is active (not stopped)
|
|
956
|
+
* @deprecated Use `!queue.paused` to check if audio is playing. Will be removed in v6.0.
|
|
922
957
|
*/
|
|
923
958
|
isPlaying(): boolean;
|
|
924
959
|
/**
|
|
925
960
|
* @returns `true` if the queue is paused
|
|
961
|
+
* @deprecated Use `queue.paused` property instead. Will be removed in v6.0.
|
|
926
962
|
*/
|
|
927
963
|
isPaused(): boolean;
|
|
928
964
|
/**
|
|
@@ -980,7 +1016,13 @@ declare class Queue extends DisTubeBase {
|
|
|
980
1016
|
* @param time - Time in seconds
|
|
981
1017
|
* @returns The guild queue
|
|
982
1018
|
*/
|
|
983
|
-
seek(time: number): Queue
|
|
1019
|
+
seek(time: number): Promise<Queue>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Internal implementation of addRelatedSong without task queue protection.
|
|
1022
|
+
* Used by methods that already hold the task queue lock.
|
|
1023
|
+
* @internal
|
|
1024
|
+
*/
|
|
1025
|
+
_addRelatedSong(song?: Song): Promise<Song>;
|
|
984
1026
|
/**
|
|
985
1027
|
* Add a related song of the playing song to the queue
|
|
986
1028
|
* @param song - The song to get related songs from. Defaults to the current playing song.
|
|
@@ -1160,17 +1202,20 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1160
1202
|
* Pause the guild stream
|
|
1161
1203
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1162
1204
|
* @returns The guild queue
|
|
1205
|
+
* @deprecated Use `distube.getQueue(guild).pause()` instead. Will be removed in v6.0.
|
|
1163
1206
|
*/
|
|
1164
1207
|
pause(guild: GuildIdResolvable): Promise<Queue>;
|
|
1165
1208
|
/**
|
|
1166
1209
|
* Resume the guild stream
|
|
1167
1210
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1168
1211
|
* @returns The guild queue
|
|
1212
|
+
* @deprecated Use `distube.getQueue(guild).resume()` instead. Will be removed in v6.0.
|
|
1169
1213
|
*/
|
|
1170
1214
|
resume(guild: GuildIdResolvable): Promise<Queue>;
|
|
1171
1215
|
/**
|
|
1172
1216
|
* Stop the guild stream
|
|
1173
1217
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1218
|
+
* @deprecated Use `distube.getQueue(guild).stop()` instead. Will be removed in v6.0.
|
|
1174
1219
|
*/
|
|
1175
1220
|
stop(guild: GuildIdResolvable): Promise<void>;
|
|
1176
1221
|
/**
|
|
@@ -1178,6 +1223,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1178
1223
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1179
1224
|
* @param percent - The percentage of volume you want to set
|
|
1180
1225
|
* @returns The guild queue
|
|
1226
|
+
* @deprecated Use `distube.getQueue(guild).setVolume(percent)` instead. Will be removed in v6.0.
|
|
1181
1227
|
*/
|
|
1182
1228
|
setVolume(guild: GuildIdResolvable, percent: number): Queue;
|
|
1183
1229
|
/**
|
|
@@ -1186,18 +1232,21 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1186
1232
|
* play a related song.</info>
|
|
1187
1233
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1188
1234
|
* @returns The new Song will be played
|
|
1235
|
+
* @deprecated Use `distube.getQueue(guild).skip(options)` instead. Will be removed in v6.0.
|
|
1189
1236
|
*/
|
|
1190
1237
|
skip(guild: GuildIdResolvable, options?: JumpOptions): Promise<Song>;
|
|
1191
1238
|
/**
|
|
1192
1239
|
* Play the previous song
|
|
1193
1240
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1194
1241
|
* @returns The new Song will be played
|
|
1242
|
+
* @deprecated Use `distube.getQueue(guild).previous()` instead. Will be removed in v6.0.
|
|
1195
1243
|
*/
|
|
1196
1244
|
previous(guild: GuildIdResolvable): Promise<Song>;
|
|
1197
1245
|
/**
|
|
1198
1246
|
* Shuffle the guild queue songs
|
|
1199
1247
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1200
1248
|
* @returns The guild queue
|
|
1249
|
+
* @deprecated Use `distube.getQueue(guild).shuffle()` instead. Will be removed in v6.0.
|
|
1201
1250
|
*/
|
|
1202
1251
|
shuffle(guild: GuildIdResolvable): Promise<Queue>;
|
|
1203
1252
|
/**
|
|
@@ -1206,6 +1255,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1206
1255
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1207
1256
|
* @param num - The song number to play
|
|
1208
1257
|
* @returns The new Song will be played
|
|
1258
|
+
* @deprecated Use `distube.getQueue(guild).jump(num, options)` instead. Will be removed in v6.0.
|
|
1209
1259
|
*/
|
|
1210
1260
|
jump(guild: GuildIdResolvable, num: number, options?: JumpOptions): Promise<Song>;
|
|
1211
1261
|
/**
|
|
@@ -1214,18 +1264,21 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1214
1264
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1215
1265
|
* @param mode - The repeat modes (toggle if `undefined`)
|
|
1216
1266
|
* @returns The new repeat mode
|
|
1267
|
+
* @deprecated Use `distube.getQueue(guild).setRepeatMode(mode)` instead. Will be removed in v6.0.
|
|
1217
1268
|
*/
|
|
1218
1269
|
setRepeatMode(guild: GuildIdResolvable, mode?: RepeatMode): RepeatMode;
|
|
1219
1270
|
/**
|
|
1220
1271
|
* Toggle autoplay mode
|
|
1221
1272
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1222
1273
|
* @returns Autoplay mode state
|
|
1274
|
+
* @deprecated Use `distube.getQueue(guild).toggleAutoplay()` instead. Will be removed in v6.0.
|
|
1223
1275
|
*/
|
|
1224
1276
|
toggleAutoplay(guild: GuildIdResolvable): boolean;
|
|
1225
1277
|
/**
|
|
1226
1278
|
* Add related song to the queue
|
|
1227
1279
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1228
1280
|
* @returns The guild queue
|
|
1281
|
+
* @deprecated Use `distube.getQueue(guild).addRelatedSong()` instead. Will be removed in v6.0.
|
|
1229
1282
|
*/
|
|
1230
1283
|
addRelatedSong(guild: GuildIdResolvable): Promise<Song>;
|
|
1231
1284
|
/**
|
|
@@ -1233,8 +1286,9 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1233
1286
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1234
1287
|
* @param time - Time in seconds
|
|
1235
1288
|
* @returns Seeked queue
|
|
1289
|
+
* @deprecated Use `distube.getQueue(guild).seek(time)` instead. Will be removed in v6.0.
|
|
1236
1290
|
*/
|
|
1237
|
-
seek(guild: GuildIdResolvable, time: number): Queue
|
|
1291
|
+
seek(guild: GuildIdResolvable, time: number): Promise<Queue>;
|
|
1238
1292
|
/**
|
|
1239
1293
|
* Emit error event
|
|
1240
1294
|
* @param error - error
|
|
@@ -1498,4 +1552,4 @@ declare const checkEncryptionLibraries: () => Promise<boolean>;
|
|
|
1498
1552
|
|
|
1499
1553
|
// @ts-ignore
|
|
1500
1554
|
export = DisTube;
|
|
1501
|
-
export { type Awaitable, BaseManager, type CustomPlaylistOptions, DisTube, DisTubeBase, DisTubeError, type DisTubeEvents, DisTubeHandler, type DisTubeOptions, type DisTubePlugin, DisTubeStream, DisTubeVoice, type DisTubeVoiceEvents, DisTubeVoiceManager, Events, ExtractorPlugin, type FFmpegArg, type FFmpegArgs, type FFmpegOptions, type Falsy, type Filter, FilterManager, type FilterResolvable, type Filters, GuildIdManager, type GuildIdResolvable, InfoExtractorPlugin, type JumpOptions, type KeyOf, Options, type PlayHandlerOptions, type PlayOptions, PlayableExtractorPlugin, Playlist, type PlaylistInfo, Plugin, PluginType, Queue, QueueManager, type RelatedSong, RepeatMode, type ResolveOptions, type ResolvePlaylistOptions, Song, type SongInfo, type StreamOptions, TaskQueue, type TypedDisTubeEvents, checkEncryptionLibraries, checkFFmpeg, checkIntents, checkInvalidKey, defaultFilters, defaultOptions, formatDuration, isClientInstance, isGuildInstance, isMemberInstance, isMessageInstance, isNsfwChannel, isObject, isSnowflake, isSupportedVoiceChannel, isTextChannelInstance, isTruthy, isURL, isVoiceChannelEmpty, objectKeys, resolveGuildId, version };
|
|
1555
|
+
export { AUDIO_CHANNELS, AUDIO_SAMPLE_RATE, type Awaitable, BaseManager, type CustomPlaylistOptions, DEFAULT_VOLUME, DisTube, DisTubeBase, DisTubeError, type DisTubeEvents, DisTubeHandler, type DisTubeOptions, type DisTubePlugin, DisTubeStream, DisTubeVoice, type DisTubeVoiceEvents, DisTubeVoiceManager, Events, ExtractorPlugin, type FFmpegArg, type FFmpegArgs, type FFmpegOptions, type Falsy, type Filter, FilterManager, type FilterResolvable, type Filters, GuildIdManager, type GuildIdResolvable, HTTP_REDIRECT_CODES, InfoExtractorPlugin, InfoExtractorPlugin as InfoExtratorPlugin, JOIN_TIMEOUT_MS, type JumpOptions, type KeyOf, MAX_REDIRECT_DEPTH, Options, type PlayHandlerOptions, type PlayOptions, PlayableExtractorPlugin, PlayableExtractorPlugin as PlayableExtratorPlugin, Playlist, type PlaylistInfo, Plugin, PluginType, Queue, QueueManager, RECONNECT_MAX_ATTEMPTS, RECONNECT_TIMEOUT_MS, type RelatedSong, RepeatMode, type ResolveOptions, type ResolvePlaylistOptions, Song, type SongInfo, type StreamOptions, TaskQueue, type TypedDisTubeEvents, checkEncryptionLibraries, checkFFmpeg, checkIntents, checkInvalidKey, defaultFilters, defaultOptions, formatDuration, isClientInstance, isGuildInstance, isMemberInstance, isMessageInstance, isNsfwChannel, isObject, isSnowflake, isSupportedVoiceChannel, isTextChannelInstance, isTruthy, isURL, isVoiceChannelEmpty, objectKeys, resolveGuildId, version };
|