distube 2.8.18 → 3.0.0-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/README.md +32 -98
- package/dist/DisTube.d.ts +522 -0
- package/dist/DisTube.d.ts.map +1 -0
- package/dist/DisTube.js +794 -0
- package/dist/DisTube.js.map +1 -0
- package/dist/constant.d.ts +130 -0
- package/dist/constant.d.ts.map +1 -0
- package/dist/constant.js +150 -0
- package/dist/constant.js.map +1 -0
- package/dist/core/DisTubeBase.d.ts +55 -0
- package/dist/core/DisTubeBase.d.ts.map +1 -0
- package/dist/core/DisTubeBase.js +76 -0
- package/dist/core/DisTubeBase.js.map +1 -0
- package/dist/core/DisTubeHandler.d.ts +84 -0
- package/dist/core/DisTubeHandler.d.ts.map +1 -0
- package/dist/core/DisTubeHandler.js +311 -0
- package/dist/core/DisTubeHandler.js.map +1 -0
- package/dist/core/DisTubeOptions.d.ts +26 -0
- package/dist/core/DisTubeOptions.d.ts.map +1 -0
- package/dist/core/DisTubeOptions.js +93 -0
- package/dist/core/DisTubeOptions.js.map +1 -0
- package/dist/core/DisTubeStream.d.ts +52 -0
- package/dist/core/DisTubeStream.d.ts.map +1 -0
- package/dist/core/DisTubeStream.js +109 -0
- package/dist/core/DisTubeStream.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +19 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/manager/BaseManager.d.ts +18 -0
- package/dist/core/manager/BaseManager.d.ts.map +1 -0
- package/dist/core/manager/BaseManager.js +44 -0
- package/dist/core/manager/BaseManager.js.map +1 -0
- package/dist/core/manager/QueueManager.d.ts +60 -0
- package/dist/core/manager/QueueManager.d.ts.map +1 -0
- package/dist/core/manager/QueueManager.js +202 -0
- package/dist/core/manager/QueueManager.js.map +1 -0
- package/dist/core/manager/index.d.ts +3 -0
- package/dist/core/manager/index.d.ts.map +1 -0
- package/dist/core/manager/index.js +15 -0
- package/dist/core/manager/index.js.map +1 -0
- package/dist/core/voice/DJSAdapter.d.ts +4 -0
- package/dist/core/voice/DJSAdapter.d.ts.map +1 -0
- package/dist/core/voice/DJSAdapter.js +61 -0
- package/dist/core/voice/DJSAdapter.js.map +1 -0
- package/dist/core/voice/DisTubeVoice.d.ts +83 -0
- package/dist/core/voice/DisTubeVoice.d.ts.map +1 -0
- package/dist/core/voice/DisTubeVoice.js +236 -0
- package/dist/core/voice/DisTubeVoice.js.map +1 -0
- package/dist/core/voice/DisTubeVoiceManager.d.ts +41 -0
- package/dist/core/voice/DisTubeVoiceManager.d.ts.map +1 -0
- package/dist/core/voice/DisTubeVoiceManager.js +67 -0
- package/dist/core/voice/DisTubeVoiceManager.js.map +1 -0
- package/dist/core/voice/index.d.ts +4 -0
- package/dist/core/voice/index.d.ts.map +1 -0
- package/dist/core/voice/index.js +16 -0
- package/dist/core/voice/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin/http.d.ts +8 -0
- package/dist/plugin/http.d.ts.map +1 -0
- package/dist/plugin/http.js +20 -0
- package/dist/plugin/http.js.map +1 -0
- package/dist/plugin/https.d.ts +14 -0
- package/dist/plugin/https.d.ts.map +1 -0
- package/dist/plugin/https.js +50 -0
- package/dist/plugin/https.js.map +1 -0
- package/dist/plugin/index.d.ts +4 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +16 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/youtube-dl.d.ts +11 -0
- package/dist/plugin/youtube-dl.d.ts.map +1 -0
- package/dist/plugin/youtube-dl.js +75 -0
- package/dist/plugin/youtube-dl.js.map +1 -0
- package/dist/struct/CustomPlugin.d.ts +27 -0
- package/dist/struct/CustomPlugin.d.ts.map +1 -0
- package/dist/struct/CustomPlugin.js +35 -0
- package/dist/struct/CustomPlugin.js.map +1 -0
- package/dist/struct/DisTubeError.d.ts +54 -0
- package/dist/struct/DisTubeError.d.ts.map +1 -0
- package/dist/struct/DisTubeError.js +72 -0
- package/dist/struct/DisTubeError.js.map +1 -0
- package/dist/struct/ExtractorPlugin.d.ts +29 -0
- package/dist/struct/ExtractorPlugin.d.ts.map +1 -0
- package/dist/struct/ExtractorPlugin.js +32 -0
- package/dist/struct/ExtractorPlugin.js.map +1 -0
- package/dist/struct/Playlist.d.ts +42 -0
- package/dist/struct/Playlist.d.ts.map +1 -0
- package/dist/struct/Playlist.js +104 -0
- package/dist/struct/Playlist.js.map +1 -0
- package/dist/struct/Plugin.d.ts +82 -0
- package/dist/struct/Plugin.d.ts.map +1 -0
- package/dist/struct/Plugin.js +108 -0
- package/dist/struct/Plugin.js.map +1 -0
- package/dist/struct/Queue.d.ts +217 -0
- package/dist/struct/Queue.d.ts.map +1 -0
- package/dist/struct/Queue.js +480 -0
- package/dist/struct/Queue.js.map +1 -0
- package/dist/struct/SearchResult.d.ts +28 -0
- package/dist/struct/SearchResult.d.ts.map +1 -0
- package/dist/struct/SearchResult.js +79 -0
- package/dist/struct/SearchResult.js.map +1 -0
- package/dist/struct/Song.d.ts +68 -0
- package/dist/struct/Song.d.ts.map +1 -0
- package/dist/struct/Song.js +229 -0
- package/dist/struct/Song.js.map +1 -0
- package/dist/struct/TaskQueue.d.ts +33 -0
- package/dist/struct/TaskQueue.d.ts.map +1 -0
- package/dist/struct/TaskQueue.js +58 -0
- package/dist/struct/TaskQueue.js.map +1 -0
- package/dist/struct/index.d.ts +10 -0
- package/dist/struct/index.d.ts.map +1 -0
- package/dist/struct/index.js +22 -0
- package/dist/struct/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/type.d.ts +159 -0
- package/dist/type.d.ts.map +1 -0
- package/dist/type.js +3 -0
- package/dist/type.js.map +1 -0
- package/dist/util.d.ts +47 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +205 -0
- package/dist/util.js.map +1 -0
- package/package.json +50 -24
- package/src/DisTube.js +0 -1121
- package/src/Playlist.js +0 -107
- package/src/Queue.js +0 -120
- package/src/SearchResult.js +0 -81
- package/src/Song.js +0 -135
- package/src/duration.js +0 -39
- package/typings/DisTube.d.ts +0 -635
- package/typings/Playlist.d.ts +0 -73
- package/typings/Queue.d.ts +0 -106
- package/typings/SearchResult.d.ts +0 -59
- package/typings/Song.d.ts +0 -104
- package/typings/duration.d.ts +0 -2
package/typings/Playlist.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export = Playlist;
|
|
2
|
-
/** Class representing a playlist. */
|
|
3
|
-
declare class Playlist {
|
|
4
|
-
/**
|
|
5
|
-
* Create a playlist
|
|
6
|
-
* @param {ytpl.result|Song[]} playlist Playlist
|
|
7
|
-
* @param {Discord.User} user Requested user
|
|
8
|
-
* @param {Object} properties Custom properties
|
|
9
|
-
*/
|
|
10
|
-
constructor(playlist: any | Song[], user: Discord.User, properties?: any);
|
|
11
|
-
/**
|
|
12
|
-
* User requested.
|
|
13
|
-
* @type {Discord.User}
|
|
14
|
-
*/
|
|
15
|
-
user: Discord.User;
|
|
16
|
-
/**
|
|
17
|
-
* Playlist songs.
|
|
18
|
-
* @type {Song[]}
|
|
19
|
-
*/
|
|
20
|
-
songs: Song[];
|
|
21
|
-
/**
|
|
22
|
-
* Playlist name.
|
|
23
|
-
* @type {string}
|
|
24
|
-
*/
|
|
25
|
-
name: string;
|
|
26
|
-
/**
|
|
27
|
-
* Playlist URL.
|
|
28
|
-
* @type {string}
|
|
29
|
-
*/
|
|
30
|
-
url: string;
|
|
31
|
-
/**
|
|
32
|
-
* Playlist thumbnail.
|
|
33
|
-
* @type {string}
|
|
34
|
-
*/
|
|
35
|
-
thumbnail: string;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated use `Playlist.name` instead
|
|
38
|
-
* @type {string}
|
|
39
|
-
*/
|
|
40
|
-
title: string;
|
|
41
|
-
/**
|
|
42
|
-
* @deprecated use `Playlist.songs` instead
|
|
43
|
-
* @type {Song[]}
|
|
44
|
-
*/
|
|
45
|
-
items: Song[];
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated use `Playlist.songs.length` instead
|
|
48
|
-
* @type {number}
|
|
49
|
-
*/
|
|
50
|
-
total_items: number;
|
|
51
|
-
/**
|
|
52
|
-
* @deprecated
|
|
53
|
-
* @type {string}
|
|
54
|
-
*/
|
|
55
|
-
id: string;
|
|
56
|
-
/**
|
|
57
|
-
* @deprecated
|
|
58
|
-
* @type {object}
|
|
59
|
-
*/
|
|
60
|
-
author: object;
|
|
61
|
-
/**
|
|
62
|
-
* Playlist duration in second.
|
|
63
|
-
* @type {number}
|
|
64
|
-
*/
|
|
65
|
-
get duration(): number;
|
|
66
|
-
/**
|
|
67
|
-
* Formatted duration string `hh:mm:ss`.
|
|
68
|
-
* @type {string}
|
|
69
|
-
*/
|
|
70
|
-
get formattedDuration(): string;
|
|
71
|
-
}
|
|
72
|
-
import Discord = require("discord.js");
|
|
73
|
-
import Song = require("./Song");
|
package/typings/Queue.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
export = Queue;
|
|
2
|
-
/**
|
|
3
|
-
* Represents a queue.
|
|
4
|
-
*/
|
|
5
|
-
declare class Queue {
|
|
6
|
-
/**
|
|
7
|
-
* Create a queue.
|
|
8
|
-
* @param {Discord.Message} message Discord.Message
|
|
9
|
-
* @param {Song} song The first Song of the Queue
|
|
10
|
-
*/
|
|
11
|
-
constructor(message: Discord.Message, song: Song);
|
|
12
|
-
/**
|
|
13
|
-
* Stream dispatcher.
|
|
14
|
-
* @type {Discord.StreamDispatcher}
|
|
15
|
-
*/
|
|
16
|
-
dispatcher: Discord.StreamDispatcher;
|
|
17
|
-
/**
|
|
18
|
-
* Voice connection.
|
|
19
|
-
* @type {Discord.VoiceConnection}
|
|
20
|
-
*/
|
|
21
|
-
connection: Discord.VoiceConnection;
|
|
22
|
-
/**
|
|
23
|
-
* Stream volume.
|
|
24
|
-
* @type {number}
|
|
25
|
-
*/
|
|
26
|
-
volume: number;
|
|
27
|
-
/**
|
|
28
|
-
* List of songs
|
|
29
|
-
* @type {Song[]}
|
|
30
|
-
*/
|
|
31
|
-
songs: Song[];
|
|
32
|
-
/**
|
|
33
|
-
* Whether stream is currently stopped.
|
|
34
|
-
* @type {boolean}
|
|
35
|
-
*/
|
|
36
|
-
stopped: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Whether or not the last song was skipped.
|
|
39
|
-
* @type {boolean}
|
|
40
|
-
*/
|
|
41
|
-
skipped: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Whether or not the stream is currently playing.
|
|
44
|
-
* @type {boolean}
|
|
45
|
-
*/
|
|
46
|
-
playing: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Whether or not the stream is currently paused.
|
|
49
|
-
* @type {boolean}
|
|
50
|
-
*/
|
|
51
|
-
pause: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* Type of repeat mode (0 is disabled, 1 is repeating a song, 2 is repeating all the playlist)
|
|
54
|
-
* @type {number}
|
|
55
|
-
*/
|
|
56
|
-
repeatMode: number;
|
|
57
|
-
/**
|
|
58
|
-
* Whether or not the autoplay mode is enabled.
|
|
59
|
-
* @type {boolean}
|
|
60
|
-
*/
|
|
61
|
-
autoplay: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* `@2.0.0` Queue audio filter.
|
|
64
|
-
* Available filters: {@link Filter}
|
|
65
|
-
* @type {DisTube.Filter}
|
|
66
|
-
*/
|
|
67
|
-
filter: DisTube.Filter;
|
|
68
|
-
/**
|
|
69
|
-
* `@2.2.0` Message which initialize the queue
|
|
70
|
-
* @type {Discord.Message}
|
|
71
|
-
*/
|
|
72
|
-
initMessage: Discord.Message;
|
|
73
|
-
/**
|
|
74
|
-
* `@2.5.0` ytdl stream
|
|
75
|
-
* @type {Readable}
|
|
76
|
-
*/
|
|
77
|
-
stream: any;
|
|
78
|
-
/**
|
|
79
|
-
* `@2.7.0` What time in the song to begin (in milliseconds).
|
|
80
|
-
* @type {number}
|
|
81
|
-
*/
|
|
82
|
-
beginTime: number;
|
|
83
|
-
/**
|
|
84
|
-
* Formatted duration string.
|
|
85
|
-
* @type {string}
|
|
86
|
-
*/
|
|
87
|
-
get formattedDuration(): string;
|
|
88
|
-
/**
|
|
89
|
-
* Queue's duration.
|
|
90
|
-
* @type {number}
|
|
91
|
-
*/
|
|
92
|
-
get duration(): number;
|
|
93
|
-
/**
|
|
94
|
-
* `@2.7.0` What time in the song is playing (in milliseconds).
|
|
95
|
-
* @type {number}
|
|
96
|
-
*/
|
|
97
|
-
get currentTime(): number;
|
|
98
|
-
/**
|
|
99
|
-
* `@2.8.0` Formatted {@link Queue#currentTime} string.
|
|
100
|
-
* @type {string}
|
|
101
|
-
*/
|
|
102
|
-
get formattedCurrentTime(): string;
|
|
103
|
-
}
|
|
104
|
-
import Discord = require("discord.js");
|
|
105
|
-
import Song = require("./Song");
|
|
106
|
-
import DisTube = require("./DisTube");
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
export = SearchResult;
|
|
2
|
-
/** `@2.7.0` Class representing a search result. */
|
|
3
|
-
declare class SearchResult {
|
|
4
|
-
/**
|
|
5
|
-
* Create a search result.
|
|
6
|
-
* @param {ytsr.Video} info Video info
|
|
7
|
-
*/
|
|
8
|
-
constructor(info: any);
|
|
9
|
-
/**
|
|
10
|
-
* Youtube video id
|
|
11
|
-
* @type {string}
|
|
12
|
-
*/
|
|
13
|
-
id: string;
|
|
14
|
-
/**
|
|
15
|
-
* Song name aka video title.
|
|
16
|
-
* @type {string}
|
|
17
|
-
*/
|
|
18
|
-
name: string;
|
|
19
|
-
/**
|
|
20
|
-
* Song duration.
|
|
21
|
-
* @type {number}
|
|
22
|
-
*/
|
|
23
|
-
duration: number;
|
|
24
|
-
/**
|
|
25
|
-
* Formatted duration string `hh:mm:ss` or `mm:ss`.
|
|
26
|
-
* @type {string}
|
|
27
|
-
*/
|
|
28
|
-
formattedDuration: string;
|
|
29
|
-
/**
|
|
30
|
-
* Song URL.
|
|
31
|
-
* @type {string}
|
|
32
|
-
*/
|
|
33
|
-
url: string;
|
|
34
|
-
/**
|
|
35
|
-
* Song thumbnail.
|
|
36
|
-
* @type {string}
|
|
37
|
-
*/
|
|
38
|
-
thumbnail: string;
|
|
39
|
-
/**
|
|
40
|
-
* Indicates if the video is an active live.
|
|
41
|
-
* @type {boolean}
|
|
42
|
-
*/
|
|
43
|
-
isLive: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Song views count
|
|
46
|
-
* @type {number}
|
|
47
|
-
*/
|
|
48
|
-
views: number;
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated use `Song.name` instead
|
|
51
|
-
* @type {string}
|
|
52
|
-
*/
|
|
53
|
-
title: string;
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated use `Song.url` instead
|
|
56
|
-
* @type {string}
|
|
57
|
-
*/
|
|
58
|
-
link: string;
|
|
59
|
-
}
|
package/typings/Song.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export = Song;
|
|
2
|
-
/** Class representing a song. */
|
|
3
|
-
declare class Song {
|
|
4
|
-
/**
|
|
5
|
-
* Create a song.
|
|
6
|
-
* @param {ytdl.videoInfo|Object} info Video info
|
|
7
|
-
* @param {Discord.User} user Requested user
|
|
8
|
-
* @param {boolean} [youtube=false] Weather or not the video is a Youtube video.
|
|
9
|
-
*/
|
|
10
|
-
constructor(info: ytdl.videoInfo | any, user: Discord.User, youtube?: boolean);
|
|
11
|
-
/**
|
|
12
|
-
* `@2.6.0` Weather or not the video is a Youtube video.
|
|
13
|
-
* @type {boolean}
|
|
14
|
-
*/
|
|
15
|
-
youtube: boolean;
|
|
16
|
-
info: any;
|
|
17
|
-
/**
|
|
18
|
-
* User requested
|
|
19
|
-
* @type {Discord.User}
|
|
20
|
-
*/
|
|
21
|
-
user: Discord.User;
|
|
22
|
-
/**
|
|
23
|
-
* `@2.1.4` Youtube video id
|
|
24
|
-
* @type {string}
|
|
25
|
-
*/
|
|
26
|
-
id: string;
|
|
27
|
-
/**
|
|
28
|
-
* Song name aka video title.
|
|
29
|
-
* @type {string}
|
|
30
|
-
*/
|
|
31
|
-
name: string;
|
|
32
|
-
/**
|
|
33
|
-
* `@2.5.0` Indicates if the video is an active live.
|
|
34
|
-
* @type {boolean}
|
|
35
|
-
*/
|
|
36
|
-
isLive: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Song duration.
|
|
39
|
-
* @type {number}
|
|
40
|
-
*/
|
|
41
|
-
duration: number;
|
|
42
|
-
/**
|
|
43
|
-
* Formatted duration string `hh:mm:ss` or `mm:ss`.
|
|
44
|
-
* @type {string}
|
|
45
|
-
*/
|
|
46
|
-
formattedDuration: string;
|
|
47
|
-
/**
|
|
48
|
-
* Song URL.
|
|
49
|
-
* @type {string}
|
|
50
|
-
*/
|
|
51
|
-
url: string;
|
|
52
|
-
/**
|
|
53
|
-
* `@2.6.0` Stream / Download URL.
|
|
54
|
-
* @type {?string}
|
|
55
|
-
*/
|
|
56
|
-
streamURL: string | null;
|
|
57
|
-
/**
|
|
58
|
-
* Song thumbnail.
|
|
59
|
-
* @type {?string}
|
|
60
|
-
*/
|
|
61
|
-
thumbnail: string | null;
|
|
62
|
-
/**
|
|
63
|
-
* Related videos (Only available with YouTube video)
|
|
64
|
-
* @type {?ytdl.relatedVideo[]}
|
|
65
|
-
*/
|
|
66
|
-
related: ytdl.relatedVideo[] | null;
|
|
67
|
-
/**
|
|
68
|
-
* `@2.6.0` Song views count
|
|
69
|
-
* @type {number}
|
|
70
|
-
*/
|
|
71
|
-
views: number;
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated use `Song.views` instead
|
|
74
|
-
* @type {number}
|
|
75
|
-
*/
|
|
76
|
-
plays: number;
|
|
77
|
-
/**
|
|
78
|
-
* `@2.6.0` Song like count
|
|
79
|
-
* @type {number}
|
|
80
|
-
*/
|
|
81
|
-
likes: number;
|
|
82
|
-
/**
|
|
83
|
-
* `@2.6.0` Song dislike count
|
|
84
|
-
* @type {number}
|
|
85
|
-
*/
|
|
86
|
-
dislikes: number;
|
|
87
|
-
/**
|
|
88
|
-
* `@2.6.0` Song repost count
|
|
89
|
-
* @type {number}
|
|
90
|
-
*/
|
|
91
|
-
reposts: number;
|
|
92
|
-
/**
|
|
93
|
-
* @deprecated use `Song.name` instead
|
|
94
|
-
* @type {string}
|
|
95
|
-
*/
|
|
96
|
-
title: string;
|
|
97
|
-
/**
|
|
98
|
-
* @deprecated use `Song.url` instead
|
|
99
|
-
* @type {string}
|
|
100
|
-
*/
|
|
101
|
-
link: string;
|
|
102
|
-
}
|
|
103
|
-
import Discord = require("discord.js");
|
|
104
|
-
import ytdl = require("ytdl-core");
|
package/typings/duration.d.ts
DELETED