distube 5.1.1 → 5.2.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/dist/index.d.mts +53 -5
- package/dist/index.d.ts +53 -5
- package/dist/index.js +111 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +101 -37
- 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
|
/**
|
|
@@ -1160,17 +1196,20 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1160
1196
|
* Pause the guild stream
|
|
1161
1197
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1162
1198
|
* @returns The guild queue
|
|
1199
|
+
* @deprecated Use `distube.getQueue(guild).pause()` instead. Will be removed in v6.0.
|
|
1163
1200
|
*/
|
|
1164
1201
|
pause(guild: GuildIdResolvable): Promise<Queue>;
|
|
1165
1202
|
/**
|
|
1166
1203
|
* Resume the guild stream
|
|
1167
1204
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1168
1205
|
* @returns The guild queue
|
|
1206
|
+
* @deprecated Use `distube.getQueue(guild).resume()` instead. Will be removed in v6.0.
|
|
1169
1207
|
*/
|
|
1170
1208
|
resume(guild: GuildIdResolvable): Promise<Queue>;
|
|
1171
1209
|
/**
|
|
1172
1210
|
* Stop the guild stream
|
|
1173
1211
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1212
|
+
* @deprecated Use `distube.getQueue(guild).stop()` instead. Will be removed in v6.0.
|
|
1174
1213
|
*/
|
|
1175
1214
|
stop(guild: GuildIdResolvable): Promise<void>;
|
|
1176
1215
|
/**
|
|
@@ -1178,6 +1217,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1178
1217
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1179
1218
|
* @param percent - The percentage of volume you want to set
|
|
1180
1219
|
* @returns The guild queue
|
|
1220
|
+
* @deprecated Use `distube.getQueue(guild).setVolume(percent)` instead. Will be removed in v6.0.
|
|
1181
1221
|
*/
|
|
1182
1222
|
setVolume(guild: GuildIdResolvable, percent: number): Queue;
|
|
1183
1223
|
/**
|
|
@@ -1186,18 +1226,21 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1186
1226
|
* play a related song.</info>
|
|
1187
1227
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1188
1228
|
* @returns The new Song will be played
|
|
1229
|
+
* @deprecated Use `distube.getQueue(guild).skip(options)` instead. Will be removed in v6.0.
|
|
1189
1230
|
*/
|
|
1190
1231
|
skip(guild: GuildIdResolvable, options?: JumpOptions): Promise<Song>;
|
|
1191
1232
|
/**
|
|
1192
1233
|
* Play the previous song
|
|
1193
1234
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1194
1235
|
* @returns The new Song will be played
|
|
1236
|
+
* @deprecated Use `distube.getQueue(guild).previous()` instead. Will be removed in v6.0.
|
|
1195
1237
|
*/
|
|
1196
1238
|
previous(guild: GuildIdResolvable): Promise<Song>;
|
|
1197
1239
|
/**
|
|
1198
1240
|
* Shuffle the guild queue songs
|
|
1199
1241
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1200
1242
|
* @returns The guild queue
|
|
1243
|
+
* @deprecated Use `distube.getQueue(guild).shuffle()` instead. Will be removed in v6.0.
|
|
1201
1244
|
*/
|
|
1202
1245
|
shuffle(guild: GuildIdResolvable): Promise<Queue>;
|
|
1203
1246
|
/**
|
|
@@ -1206,6 +1249,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1206
1249
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1207
1250
|
* @param num - The song number to play
|
|
1208
1251
|
* @returns The new Song will be played
|
|
1252
|
+
* @deprecated Use `distube.getQueue(guild).jump(num, options)` instead. Will be removed in v6.0.
|
|
1209
1253
|
*/
|
|
1210
1254
|
jump(guild: GuildIdResolvable, num: number, options?: JumpOptions): Promise<Song>;
|
|
1211
1255
|
/**
|
|
@@ -1214,18 +1258,21 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1214
1258
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1215
1259
|
* @param mode - The repeat modes (toggle if `undefined`)
|
|
1216
1260
|
* @returns The new repeat mode
|
|
1261
|
+
* @deprecated Use `distube.getQueue(guild).setRepeatMode(mode)` instead. Will be removed in v6.0.
|
|
1217
1262
|
*/
|
|
1218
1263
|
setRepeatMode(guild: GuildIdResolvable, mode?: RepeatMode): RepeatMode;
|
|
1219
1264
|
/**
|
|
1220
1265
|
* Toggle autoplay mode
|
|
1221
1266
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1222
1267
|
* @returns Autoplay mode state
|
|
1268
|
+
* @deprecated Use `distube.getQueue(guild).toggleAutoplay()` instead. Will be removed in v6.0.
|
|
1223
1269
|
*/
|
|
1224
1270
|
toggleAutoplay(guild: GuildIdResolvable): boolean;
|
|
1225
1271
|
/**
|
|
1226
1272
|
* Add related song to the queue
|
|
1227
1273
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1228
1274
|
* @returns The guild queue
|
|
1275
|
+
* @deprecated Use `distube.getQueue(guild).addRelatedSong()` instead. Will be removed in v6.0.
|
|
1229
1276
|
*/
|
|
1230
1277
|
addRelatedSong(guild: GuildIdResolvable): Promise<Song>;
|
|
1231
1278
|
/**
|
|
@@ -1233,6 +1280,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1233
1280
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1234
1281
|
* @param time - Time in seconds
|
|
1235
1282
|
* @returns Seeked queue
|
|
1283
|
+
* @deprecated Use `distube.getQueue(guild).seek(time)` instead. Will be removed in v6.0.
|
|
1236
1284
|
*/
|
|
1237
1285
|
seek(guild: GuildIdResolvable, time: number): Queue;
|
|
1238
1286
|
/**
|
|
@@ -1496,4 +1544,4 @@ type Falsy = undefined | null | false | 0 | "";
|
|
|
1496
1544
|
declare const isTruthy: <T>(x: T | Falsy) => x is T;
|
|
1497
1545
|
declare const checkEncryptionLibraries: () => Promise<boolean>;
|
|
1498
1546
|
|
|
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 };
|
|
1547
|
+
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
|
/**
|
|
@@ -1160,17 +1196,20 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1160
1196
|
* Pause the guild stream
|
|
1161
1197
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1162
1198
|
* @returns The guild queue
|
|
1199
|
+
* @deprecated Use `distube.getQueue(guild).pause()` instead. Will be removed in v6.0.
|
|
1163
1200
|
*/
|
|
1164
1201
|
pause(guild: GuildIdResolvable): Promise<Queue>;
|
|
1165
1202
|
/**
|
|
1166
1203
|
* Resume the guild stream
|
|
1167
1204
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1168
1205
|
* @returns The guild queue
|
|
1206
|
+
* @deprecated Use `distube.getQueue(guild).resume()` instead. Will be removed in v6.0.
|
|
1169
1207
|
*/
|
|
1170
1208
|
resume(guild: GuildIdResolvable): Promise<Queue>;
|
|
1171
1209
|
/**
|
|
1172
1210
|
* Stop the guild stream
|
|
1173
1211
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1212
|
+
* @deprecated Use `distube.getQueue(guild).stop()` instead. Will be removed in v6.0.
|
|
1174
1213
|
*/
|
|
1175
1214
|
stop(guild: GuildIdResolvable): Promise<void>;
|
|
1176
1215
|
/**
|
|
@@ -1178,6 +1217,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1178
1217
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1179
1218
|
* @param percent - The percentage of volume you want to set
|
|
1180
1219
|
* @returns The guild queue
|
|
1220
|
+
* @deprecated Use `distube.getQueue(guild).setVolume(percent)` instead. Will be removed in v6.0.
|
|
1181
1221
|
*/
|
|
1182
1222
|
setVolume(guild: GuildIdResolvable, percent: number): Queue;
|
|
1183
1223
|
/**
|
|
@@ -1186,18 +1226,21 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1186
1226
|
* play a related song.</info>
|
|
1187
1227
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1188
1228
|
* @returns The new Song will be played
|
|
1229
|
+
* @deprecated Use `distube.getQueue(guild).skip(options)` instead. Will be removed in v6.0.
|
|
1189
1230
|
*/
|
|
1190
1231
|
skip(guild: GuildIdResolvable, options?: JumpOptions): Promise<Song>;
|
|
1191
1232
|
/**
|
|
1192
1233
|
* Play the previous song
|
|
1193
1234
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1194
1235
|
* @returns The new Song will be played
|
|
1236
|
+
* @deprecated Use `distube.getQueue(guild).previous()` instead. Will be removed in v6.0.
|
|
1195
1237
|
*/
|
|
1196
1238
|
previous(guild: GuildIdResolvable): Promise<Song>;
|
|
1197
1239
|
/**
|
|
1198
1240
|
* Shuffle the guild queue songs
|
|
1199
1241
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1200
1242
|
* @returns The guild queue
|
|
1243
|
+
* @deprecated Use `distube.getQueue(guild).shuffle()` instead. Will be removed in v6.0.
|
|
1201
1244
|
*/
|
|
1202
1245
|
shuffle(guild: GuildIdResolvable): Promise<Queue>;
|
|
1203
1246
|
/**
|
|
@@ -1206,6 +1249,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1206
1249
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1207
1250
|
* @param num - The song number to play
|
|
1208
1251
|
* @returns The new Song will be played
|
|
1252
|
+
* @deprecated Use `distube.getQueue(guild).jump(num, options)` instead. Will be removed in v6.0.
|
|
1209
1253
|
*/
|
|
1210
1254
|
jump(guild: GuildIdResolvable, num: number, options?: JumpOptions): Promise<Song>;
|
|
1211
1255
|
/**
|
|
@@ -1214,18 +1258,21 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1214
1258
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1215
1259
|
* @param mode - The repeat modes (toggle if `undefined`)
|
|
1216
1260
|
* @returns The new repeat mode
|
|
1261
|
+
* @deprecated Use `distube.getQueue(guild).setRepeatMode(mode)` instead. Will be removed in v6.0.
|
|
1217
1262
|
*/
|
|
1218
1263
|
setRepeatMode(guild: GuildIdResolvable, mode?: RepeatMode): RepeatMode;
|
|
1219
1264
|
/**
|
|
1220
1265
|
* Toggle autoplay mode
|
|
1221
1266
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1222
1267
|
* @returns Autoplay mode state
|
|
1268
|
+
* @deprecated Use `distube.getQueue(guild).toggleAutoplay()` instead. Will be removed in v6.0.
|
|
1223
1269
|
*/
|
|
1224
1270
|
toggleAutoplay(guild: GuildIdResolvable): boolean;
|
|
1225
1271
|
/**
|
|
1226
1272
|
* Add related song to the queue
|
|
1227
1273
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1228
1274
|
* @returns The guild queue
|
|
1275
|
+
* @deprecated Use `distube.getQueue(guild).addRelatedSong()` instead. Will be removed in v6.0.
|
|
1229
1276
|
*/
|
|
1230
1277
|
addRelatedSong(guild: GuildIdResolvable): Promise<Song>;
|
|
1231
1278
|
/**
|
|
@@ -1233,6 +1280,7 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1233
1280
|
* @param guild - The type can be resolved to give a {@link Queue}
|
|
1234
1281
|
* @param time - Time in seconds
|
|
1235
1282
|
* @returns Seeked queue
|
|
1283
|
+
* @deprecated Use `distube.getQueue(guild).seek(time)` instead. Will be removed in v6.0.
|
|
1236
1284
|
*/
|
|
1237
1285
|
seek(guild: GuildIdResolvable, time: number): Queue;
|
|
1238
1286
|
/**
|
|
@@ -1498,4 +1546,4 @@ declare const checkEncryptionLibraries: () => Promise<boolean>;
|
|
|
1498
1546
|
|
|
1499
1547
|
// @ts-ignore
|
|
1500
1548
|
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 };
|
|
1549
|
+
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 };
|