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.
Files changed (158) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +64 -51
  3. package/dist/DisTube.d.ts +522 -0
  4. package/dist/DisTube.d.ts.map +1 -0
  5. package/dist/DisTube.js +794 -0
  6. package/dist/DisTube.js.map +1 -0
  7. package/dist/constant.d.ts +130 -0
  8. package/dist/constant.d.ts.map +1 -0
  9. package/dist/constant.js +150 -0
  10. package/dist/constant.js.map +1 -0
  11. package/dist/core/DisTubeBase.d.ts +55 -0
  12. package/dist/core/DisTubeBase.d.ts.map +1 -0
  13. package/dist/core/DisTubeBase.js +76 -0
  14. package/dist/core/DisTubeBase.js.map +1 -0
  15. package/dist/core/DisTubeHandler.d.ts +95 -0
  16. package/dist/core/DisTubeHandler.d.ts.map +1 -0
  17. package/dist/core/DisTubeHandler.js +337 -0
  18. package/dist/core/DisTubeHandler.js.map +1 -0
  19. package/dist/core/DisTubeOptions.d.ts +26 -0
  20. package/dist/core/DisTubeOptions.d.ts.map +1 -0
  21. package/dist/core/DisTubeOptions.js +93 -0
  22. package/dist/core/DisTubeOptions.js.map +1 -0
  23. package/dist/core/DisTubeStream.d.ts +52 -0
  24. package/dist/core/DisTubeStream.d.ts.map +1 -0
  25. package/dist/core/DisTubeStream.js +111 -0
  26. package/dist/core/DisTubeStream.js.map +1 -0
  27. package/dist/core/index.d.ts +7 -0
  28. package/dist/core/index.d.ts.map +1 -0
  29. package/dist/core/index.js +19 -0
  30. package/dist/core/index.js.map +1 -0
  31. package/dist/core/manager/BaseManager.d.ts +18 -0
  32. package/dist/core/manager/BaseManager.d.ts.map +1 -0
  33. package/dist/core/manager/BaseManager.js +44 -0
  34. package/dist/core/manager/BaseManager.js.map +1 -0
  35. package/dist/core/manager/QueueManager.d.ts +60 -0
  36. package/dist/core/manager/QueueManager.d.ts.map +1 -0
  37. package/dist/core/manager/QueueManager.js +202 -0
  38. package/dist/core/manager/QueueManager.js.map +1 -0
  39. package/dist/core/manager/index.d.ts +3 -0
  40. package/dist/core/manager/index.d.ts.map +1 -0
  41. package/dist/core/manager/index.js +15 -0
  42. package/dist/core/manager/index.js.map +1 -0
  43. package/dist/core/voice/DJSAdapter.d.ts +4 -0
  44. package/dist/core/voice/DJSAdapter.d.ts.map +1 -0
  45. package/dist/core/voice/DJSAdapter.js +61 -0
  46. package/dist/core/voice/DJSAdapter.js.map +1 -0
  47. package/dist/core/voice/DisTubeVoice.d.ts +85 -0
  48. package/dist/core/voice/DisTubeVoice.d.ts.map +1 -0
  49. package/dist/core/voice/DisTubeVoice.js +246 -0
  50. package/dist/core/voice/DisTubeVoice.js.map +1 -0
  51. package/dist/core/voice/DisTubeVoiceManager.d.ts +41 -0
  52. package/dist/core/voice/DisTubeVoiceManager.d.ts.map +1 -0
  53. package/dist/core/voice/DisTubeVoiceManager.js +67 -0
  54. package/dist/core/voice/DisTubeVoiceManager.js.map +1 -0
  55. package/dist/core/voice/index.d.ts +4 -0
  56. package/dist/core/voice/index.d.ts.map +1 -0
  57. package/dist/core/voice/index.js +16 -0
  58. package/dist/core/voice/index.js.map +1 -0
  59. package/dist/index.d.ts +8 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +23 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/plugin/http.d.ts +8 -0
  64. package/dist/plugin/http.d.ts.map +1 -0
  65. package/dist/plugin/http.js +20 -0
  66. package/dist/plugin/http.js.map +1 -0
  67. package/dist/plugin/https.d.ts +14 -0
  68. package/dist/plugin/https.d.ts.map +1 -0
  69. package/dist/plugin/https.js +50 -0
  70. package/dist/plugin/https.js.map +1 -0
  71. package/dist/plugin/index.d.ts +4 -0
  72. package/dist/plugin/index.d.ts.map +1 -0
  73. package/dist/plugin/index.js +16 -0
  74. package/dist/plugin/index.js.map +1 -0
  75. package/dist/plugin/youtube-dl.d.ts +11 -0
  76. package/dist/plugin/youtube-dl.d.ts.map +1 -0
  77. package/dist/plugin/youtube-dl.js +75 -0
  78. package/dist/plugin/youtube-dl.js.map +1 -0
  79. package/dist/struct/CustomPlugin.d.ts +27 -0
  80. package/dist/struct/CustomPlugin.d.ts.map +1 -0
  81. package/dist/struct/CustomPlugin.js +35 -0
  82. package/dist/struct/CustomPlugin.js.map +1 -0
  83. package/dist/struct/DisTubeError.d.ts +56 -0
  84. package/dist/struct/DisTubeError.d.ts.map +1 -0
  85. package/dist/struct/DisTubeError.js +75 -0
  86. package/dist/struct/DisTubeError.js.map +1 -0
  87. package/dist/struct/ExtractorPlugin.d.ts +29 -0
  88. package/dist/struct/ExtractorPlugin.d.ts.map +1 -0
  89. package/dist/struct/ExtractorPlugin.js +32 -0
  90. package/dist/struct/ExtractorPlugin.js.map +1 -0
  91. package/dist/struct/Playlist.d.ts +42 -0
  92. package/dist/struct/Playlist.d.ts.map +1 -0
  93. package/dist/struct/Playlist.js +104 -0
  94. package/dist/struct/Playlist.js.map +1 -0
  95. package/dist/struct/Plugin.d.ts +82 -0
  96. package/dist/struct/Plugin.d.ts.map +1 -0
  97. package/dist/struct/Plugin.js +108 -0
  98. package/dist/struct/Plugin.js.map +1 -0
  99. package/dist/struct/Queue.d.ts +217 -0
  100. package/dist/struct/Queue.d.ts.map +1 -0
  101. package/dist/struct/Queue.js +481 -0
  102. package/dist/struct/Queue.js.map +1 -0
  103. package/dist/struct/SearchResult.d.ts +28 -0
  104. package/dist/struct/SearchResult.d.ts.map +1 -0
  105. package/dist/struct/SearchResult.js +79 -0
  106. package/dist/struct/SearchResult.js.map +1 -0
  107. package/dist/struct/Song.d.ts +68 -0
  108. package/dist/struct/Song.d.ts.map +1 -0
  109. package/dist/struct/Song.js +229 -0
  110. package/dist/struct/Song.js.map +1 -0
  111. package/dist/struct/TaskQueue.d.ts +33 -0
  112. package/dist/struct/TaskQueue.d.ts.map +1 -0
  113. package/dist/struct/TaskQueue.js +58 -0
  114. package/dist/struct/TaskQueue.js.map +1 -0
  115. package/dist/struct/index.d.ts +10 -0
  116. package/dist/struct/index.d.ts.map +1 -0
  117. package/dist/struct/index.js +22 -0
  118. package/dist/struct/index.js.map +1 -0
  119. package/dist/tsconfig.tsbuildinfo +1 -0
  120. package/dist/type.d.ts +159 -0
  121. package/dist/type.d.ts.map +1 -0
  122. package/dist/type.js +3 -0
  123. package/dist/type.js.map +1 -0
  124. package/dist/util.d.ts +47 -0
  125. package/dist/util.d.ts.map +1 -0
  126. package/dist/util.js +205 -0
  127. package/dist/util.js.map +1 -0
  128. package/package.json +88 -62
  129. package/src/DisTube.js +0 -851
  130. package/src/DisTubeBase.js +0 -39
  131. package/src/DisTubeHandler.js +0 -440
  132. package/src/DisTubeOptions.js +0 -82
  133. package/src/Filter.js +0 -36
  134. package/src/Playlist.js +0 -75
  135. package/src/Plugin/CustomPlugin.js +0 -26
  136. package/src/Plugin/ExtractorPlugin.js +0 -25
  137. package/src/Plugin/Plugin.js +0 -36
  138. package/src/Plugin/http.js +0 -27
  139. package/src/Plugin/https.js +0 -27
  140. package/src/Queue.js +0 -340
  141. package/src/SearchResult.js +0 -57
  142. package/src/Song.js +0 -169
  143. package/src/util.js +0 -65
  144. package/typings/DisTube.d.ts +0 -518
  145. package/typings/DisTubeBase.d.ts +0 -31
  146. package/typings/DisTubeHandler.d.ts +0 -130
  147. package/typings/DisTubeOptions.d.ts +0 -5
  148. package/typings/Filter.d.ts +0 -83
  149. package/typings/Playlist.d.ts +0 -58
  150. package/typings/Plugin/CustomPlugin.d.ts +0 -21
  151. package/typings/Plugin/ExtractorPlugin.d.ts +0 -20
  152. package/typings/Plugin/Plugin.d.ts +0 -31
  153. package/typings/Plugin/http.d.ts +0 -4
  154. package/typings/Plugin/https.d.ts +0 -4
  155. package/typings/Queue.d.ts +0 -227
  156. package/typings/SearchResult.d.ts +0 -51
  157. package/typings/Song.d.ts +0 -153
  158. 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;