distube 5.0.1 → 5.0.3
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 +1489 -0
- package/dist/index.d.ts +23 -6
- package/dist/index.js +710 -831
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2463 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +41 -31
package/dist/index.d.ts
CHANGED
|
@@ -159,8 +159,7 @@ interface SongInfo {
|
|
|
159
159
|
plugin: DisTubePlugin | null;
|
|
160
160
|
source: string;
|
|
161
161
|
playFromSource: boolean;
|
|
162
|
-
|
|
163
|
-
id?: string;
|
|
162
|
+
id: string;
|
|
164
163
|
name?: string;
|
|
165
164
|
isLive?: boolean;
|
|
166
165
|
duration?: number;
|
|
@@ -337,6 +336,7 @@ declare const ERROR_MESSAGES: {
|
|
|
337
336
|
VOICE_DIFFERENT_CLIENT: string;
|
|
338
337
|
FFMPEG_EXITED: (code: number) => string;
|
|
339
338
|
FFMPEG_NOT_INSTALLED: (path: string) => string;
|
|
339
|
+
ENCRYPTION_LIBRARIES_MISSING: string;
|
|
340
340
|
NO_QUEUE: string;
|
|
341
341
|
QUEUE_EXIST: string;
|
|
342
342
|
QUEUE_STOPPED: string;
|
|
@@ -346,6 +346,7 @@ declare const ERROR_MESSAGES: {
|
|
|
346
346
|
NO_UP_NEXT: string;
|
|
347
347
|
NO_SONG_POSITION: string;
|
|
348
348
|
NO_PLAYING_SONG: string;
|
|
349
|
+
NO_EXTRACTOR_PLUGIN: string;
|
|
349
350
|
NO_RELATED: string;
|
|
350
351
|
CANNOT_PLAY_RELATED: string;
|
|
351
352
|
UNAVAILABLE_VIDEO: string;
|
|
@@ -469,7 +470,7 @@ declare class Song<T = unknown> {
|
|
|
469
470
|
/**
|
|
470
471
|
* Song ID.
|
|
471
472
|
*/
|
|
472
|
-
id
|
|
473
|
+
id: string;
|
|
473
474
|
/**
|
|
474
475
|
* Song name.
|
|
475
476
|
*/
|
|
@@ -1013,6 +1014,14 @@ declare class Queue extends DisTubeBase {
|
|
|
1013
1014
|
* @returns The guild queue
|
|
1014
1015
|
*/
|
|
1015
1016
|
addToQueue(song: Song | Song[], position?: number): Queue;
|
|
1017
|
+
/**
|
|
1018
|
+
* @returns `true` if the queue is playing
|
|
1019
|
+
*/
|
|
1020
|
+
isPlaying(): boolean;
|
|
1021
|
+
/**
|
|
1022
|
+
* @returns `true` if the queue is paused
|
|
1023
|
+
*/
|
|
1024
|
+
isPaused(): boolean;
|
|
1016
1025
|
/**
|
|
1017
1026
|
* Pause the guild stream
|
|
1018
1027
|
* @returns The guild queue
|
|
@@ -1086,7 +1095,7 @@ declare class Queue extends DisTubeBase {
|
|
|
1086
1095
|
*/
|
|
1087
1096
|
toggleAutoplay(): boolean;
|
|
1088
1097
|
/**
|
|
1089
|
-
* Play the queue
|
|
1098
|
+
* Play the first song in the queue
|
|
1090
1099
|
* @param emitPlaySong - Whether or not emit {@link Events.PLAY_SONG} event
|
|
1091
1100
|
*/
|
|
1092
1101
|
play(emitPlaySong?: boolean): Promise<void>;
|
|
@@ -1225,8 +1234,8 @@ declare function objectKeys<T>(obj: T): KeyOf<T>;
|
|
|
1225
1234
|
declare function isNsfwChannel(channel?: GuildTextBasedChannel): boolean;
|
|
1226
1235
|
type Falsy = undefined | null | false | 0 | "";
|
|
1227
1236
|
declare const isTruthy: <T>(x: T | Falsy) => x is T;
|
|
1237
|
+
declare const checkEncryptionLibraries: () => boolean;
|
|
1228
1238
|
|
|
1229
|
-
declare const version: string;
|
|
1230
1239
|
/**
|
|
1231
1240
|
* DisTube class
|
|
1232
1241
|
*/
|
|
@@ -1469,4 +1478,12 @@ declare class DisTube extends TypedEmitter<TypedDisTubeEvents> {
|
|
|
1469
1478
|
debug(message: string): void;
|
|
1470
1479
|
}
|
|
1471
1480
|
|
|
1472
|
-
|
|
1481
|
+
/**
|
|
1482
|
+
* The current version that you are currently using.
|
|
1483
|
+
*
|
|
1484
|
+
* Note to developers:
|
|
1485
|
+
* This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild
|
|
1486
|
+
*/
|
|
1487
|
+
declare const version: string;
|
|
1488
|
+
|
|
1489
|
+
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 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 };
|