distube 3.0.0-beta.8 → 3.0.2
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/LICENSE +21 -21
- package/README.md +64 -51
- 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 +95 -0
- package/dist/core/DisTubeHandler.d.ts.map +1 -0
- package/dist/core/DisTubeHandler.js +337 -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 +111 -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 +85 -0
- package/dist/core/voice/DisTubeVoice.d.ts.map +1 -0
- package/dist/core/voice/DisTubeVoice.js +246 -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 +56 -0
- package/dist/struct/DisTubeError.d.ts.map +1 -0
- package/dist/struct/DisTubeError.js +75 -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 +481 -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 +88 -62
- package/src/DisTube.js +0 -851
- package/src/DisTubeBase.js +0 -39
- package/src/DisTubeHandler.js +0 -440
- package/src/DisTubeOptions.js +0 -82
- package/src/Filter.js +0 -36
- package/src/Playlist.js +0 -75
- package/src/Plugin/CustomPlugin.js +0 -26
- package/src/Plugin/ExtractorPlugin.js +0 -25
- package/src/Plugin/Plugin.js +0 -36
- package/src/Plugin/http.js +0 -27
- package/src/Plugin/https.js +0 -27
- package/src/Queue.js +0 -340
- package/src/SearchResult.js +0 -57
- package/src/Song.js +0 -169
- package/src/util.js +0 -65
- package/typings/DisTube.d.ts +0 -518
- package/typings/DisTubeBase.d.ts +0 -31
- package/typings/DisTubeHandler.d.ts +0 -130
- package/typings/DisTubeOptions.d.ts +0 -5
- package/typings/Filter.d.ts +0 -83
- package/typings/Playlist.d.ts +0 -58
- package/typings/Plugin/CustomPlugin.d.ts +0 -21
- package/typings/Plugin/ExtractorPlugin.d.ts +0 -20
- package/typings/Plugin/Plugin.d.ts +0 -31
- package/typings/Plugin/http.d.ts +0 -4
- package/typings/Plugin/https.d.ts +0 -4
- package/typings/Queue.d.ts +0 -227
- package/typings/SearchResult.d.ts +0 -51
- package/typings/Song.d.ts +0 -153
- package/typings/util.d.ts +0 -6
package/typings/Song.d.ts
DELETED
|
@@ -1,153 +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 Raw info
|
|
7
|
-
* @param {Discord.GuildMember} member Requested user
|
|
8
|
-
* @param {string} src Song source
|
|
9
|
-
*/
|
|
10
|
-
constructor(info: ytdl.videoInfo | any, member?: Discord.GuildMember, src?: string);
|
|
11
|
-
/**
|
|
12
|
-
* The source of the song
|
|
13
|
-
* @type {string}
|
|
14
|
-
*/
|
|
15
|
-
source: string;
|
|
16
|
-
/**
|
|
17
|
-
* User requested
|
|
18
|
-
* @type {Discord.GuildMember?}
|
|
19
|
-
*/
|
|
20
|
-
member: Discord.GuildMember | null;
|
|
21
|
-
/**
|
|
22
|
-
* User requested
|
|
23
|
-
* @type {Discord.User?}
|
|
24
|
-
*/
|
|
25
|
-
user: Discord.User | null;
|
|
26
|
-
/**
|
|
27
|
-
* `ytdl-core` raw info (If the song is from YouTube)
|
|
28
|
-
* @type {ytdl.videoInfo?}
|
|
29
|
-
* @private
|
|
30
|
-
*/
|
|
31
|
-
private info;
|
|
32
|
-
/**
|
|
33
|
-
* Patch data
|
|
34
|
-
* @param {ytdl.MoreVideoDetails|Object} info Video info
|
|
35
|
-
* @private
|
|
36
|
-
*/
|
|
37
|
-
private _patch;
|
|
38
|
-
/**
|
|
39
|
-
* YouTube video id
|
|
40
|
-
* @type {string}
|
|
41
|
-
*/
|
|
42
|
-
id: string;
|
|
43
|
-
/**
|
|
44
|
-
* Song name aka video title.
|
|
45
|
-
* @type {string}
|
|
46
|
-
*/
|
|
47
|
-
name: string;
|
|
48
|
-
/**
|
|
49
|
-
* Indicates if the video is an active live.
|
|
50
|
-
* @type {boolean}
|
|
51
|
-
*/
|
|
52
|
-
isLive: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Song duration.
|
|
55
|
-
* @type {number}
|
|
56
|
-
*/
|
|
57
|
-
duration: number;
|
|
58
|
-
/**
|
|
59
|
-
* Formatted duration string (`hh:mm:ss`, `mm:ss` or `Live`).
|
|
60
|
-
* @type {string}
|
|
61
|
-
*/
|
|
62
|
-
formattedDuration: string;
|
|
63
|
-
/**
|
|
64
|
-
* Song URL.
|
|
65
|
-
* @type {string}
|
|
66
|
-
*/
|
|
67
|
-
url: string;
|
|
68
|
-
/**
|
|
69
|
-
* Stream / Download URL.
|
|
70
|
-
* @type {string?}
|
|
71
|
-
*/
|
|
72
|
-
streamURL: string | null;
|
|
73
|
-
/**
|
|
74
|
-
* Song thumbnail.
|
|
75
|
-
* @type {string?}
|
|
76
|
-
*/
|
|
77
|
-
thumbnail: string | null;
|
|
78
|
-
/**
|
|
79
|
-
* Related videos (Only available with YouTube video)
|
|
80
|
-
* @type {Array<ytdl.relatedVideo>?}
|
|
81
|
-
*/
|
|
82
|
-
related: Array<ytdl.relatedVideo> | null;
|
|
83
|
-
/**
|
|
84
|
-
* Song views count
|
|
85
|
-
* @type {number}
|
|
86
|
-
*/
|
|
87
|
-
views: number;
|
|
88
|
-
/**
|
|
89
|
-
* Song like count
|
|
90
|
-
* @type {number}
|
|
91
|
-
*/
|
|
92
|
-
likes: number;
|
|
93
|
-
/**
|
|
94
|
-
* Song dislike count
|
|
95
|
-
* @type {number}
|
|
96
|
-
*/
|
|
97
|
-
dislikes: number;
|
|
98
|
-
/**
|
|
99
|
-
* Song repost count
|
|
100
|
-
* @type {number}
|
|
101
|
-
*/
|
|
102
|
-
reposts: number;
|
|
103
|
-
/**
|
|
104
|
-
* Song uploader
|
|
105
|
-
* @type {Object}
|
|
106
|
-
* @prop {string?} name Uploader name
|
|
107
|
-
* @prop {string?} url Uploader url
|
|
108
|
-
*/
|
|
109
|
-
uploader: any;
|
|
110
|
-
/**
|
|
111
|
-
* Whether or not an age-restricted content
|
|
112
|
-
* @type {boolean}
|
|
113
|
-
*/
|
|
114
|
-
age_restricted: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* @typedef {Object} Chapter
|
|
117
|
-
* @prop {string} title Chapter title
|
|
118
|
-
* @prop {number} start_time Chapter start time in seconds
|
|
119
|
-
*/
|
|
120
|
-
/**
|
|
121
|
-
* Chapters information (YouTube only)
|
|
122
|
-
* @type {Chapter[]}
|
|
123
|
-
*/
|
|
124
|
-
chapters: Chapter[];
|
|
125
|
-
/**
|
|
126
|
-
* @param {Playlist} playlist Playlist
|
|
127
|
-
* @param {Discord.GuildMember} [member] User requested
|
|
128
|
-
* @private
|
|
129
|
-
* @returns {Song}
|
|
130
|
-
*/
|
|
131
|
-
private _patchPlaylist;
|
|
132
|
-
/**
|
|
133
|
-
* The playlist added this song
|
|
134
|
-
* @type {Playlist?}
|
|
135
|
-
*/
|
|
136
|
-
playlist: Playlist | null;
|
|
137
|
-
}
|
|
138
|
-
declare namespace Song {
|
|
139
|
-
export { Chapter };
|
|
140
|
-
}
|
|
141
|
-
import Discord = require("discord.js");
|
|
142
|
-
import ytdl = require("ytdl-core");
|
|
143
|
-
type Chapter = {
|
|
144
|
-
/**
|
|
145
|
-
* Chapter title
|
|
146
|
-
*/
|
|
147
|
-
title: string;
|
|
148
|
-
/**
|
|
149
|
-
* Chapter start time in seconds
|
|
150
|
-
*/
|
|
151
|
-
start_time: number;
|
|
152
|
-
};
|
|
153
|
-
import Playlist = require("./Playlist");
|
package/typings/util.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export function formatDuration(secs: any): string;
|
|
2
|
-
export function toSecond(string: any): number;
|
|
3
|
-
export function parseNumber(string: any): number;
|
|
4
|
-
export function mergeObject(def: any, opt: any): any;
|
|
5
|
-
export function isURL(string: any): boolean;
|
|
6
|
-
export function isVoiceChannelEmpty(queue: any): boolean;
|