distube 3.3.1 → 4.0.0-dev.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 (114) hide show
  1. package/README.md +6 -8
  2. package/dist/DisTube.d.ts +13 -557
  3. package/dist/DisTube.d.ts.map +1 -1
  4. package/dist/DisTube.js +38 -639
  5. package/dist/DisTube.js.map +1 -1
  6. package/dist/constant.d.ts +0 -101
  7. package/dist/constant.d.ts.map +1 -1
  8. package/dist/constant.js +0 -101
  9. package/dist/constant.js.map +1 -1
  10. package/dist/core/DisTubeBase.d.ts +0 -40
  11. package/dist/core/DisTubeBase.d.ts.map +1 -1
  12. package/dist/core/DisTubeBase.js +0 -44
  13. package/dist/core/DisTubeBase.js.map +1 -1
  14. package/dist/core/DisTubeHandler.d.ts +2 -89
  15. package/dist/core/DisTubeHandler.d.ts.map +1 -1
  16. package/dist/core/DisTubeHandler.js +14 -124
  17. package/dist/core/DisTubeHandler.js.map +1 -1
  18. package/dist/core/DisTubeOptions.d.ts +0 -2
  19. package/dist/core/DisTubeOptions.d.ts.map +1 -1
  20. package/dist/core/DisTubeOptions.js +0 -13
  21. package/dist/core/DisTubeOptions.js.map +1 -1
  22. package/dist/core/DisTubeStream.d.ts +0 -33
  23. package/dist/core/DisTubeStream.d.ts.map +1 -1
  24. package/dist/core/DisTubeStream.js +0 -36
  25. package/dist/core/DisTubeStream.js.map +1 -1
  26. package/dist/core/manager/BaseManager.d.ts +1 -16
  27. package/dist/core/manager/BaseManager.d.ts.map +1 -1
  28. package/dist/core/manager/BaseManager.js +2 -28
  29. package/dist/core/manager/BaseManager.js.map +1 -1
  30. package/dist/core/manager/FilterManager.d.ts +16 -0
  31. package/dist/core/manager/FilterManager.d.ts.map +1 -0
  32. package/dist/core/manager/FilterManager.js +88 -0
  33. package/dist/core/manager/FilterManager.js.map +1 -0
  34. package/dist/core/manager/GuildIdManager.d.ts +9 -0
  35. package/dist/core/manager/GuildIdManager.d.ts.map +1 -0
  36. package/dist/core/manager/GuildIdManager.js +25 -0
  37. package/dist/core/manager/GuildIdManager.js.map +1 -0
  38. package/dist/core/manager/QueueManager.d.ts +4 -26
  39. package/dist/core/manager/QueueManager.d.ts.map +1 -1
  40. package/dist/core/manager/QueueManager.js +27 -48
  41. package/dist/core/manager/QueueManager.js.map +1 -1
  42. package/dist/core/manager/index.d.ts +2 -0
  43. package/dist/core/manager/index.d.ts.map +1 -1
  44. package/dist/core/manager/index.js +2 -0
  45. package/dist/core/manager/index.js.map +1 -1
  46. package/dist/core/voice/DisTubeVoice.d.ts +0 -50
  47. package/dist/core/voice/DisTubeVoice.d.ts.map +1 -1
  48. package/dist/core/voice/DisTubeVoice.js +9 -71
  49. package/dist/core/voice/DisTubeVoice.js.map +1 -1
  50. package/dist/core/voice/DisTubeVoiceManager.d.ts +2 -33
  51. package/dist/core/voice/DisTubeVoiceManager.d.ts.map +1 -1
  52. package/dist/core/voice/DisTubeVoiceManager.js +1 -32
  53. package/dist/core/voice/DisTubeVoiceManager.js.map +1 -1
  54. package/dist/core/voice/index.d.ts +0 -1
  55. package/dist/core/voice/index.d.ts.map +1 -1
  56. package/dist/core/voice/index.js +0 -1
  57. package/dist/core/voice/index.js.map +1 -1
  58. package/dist/plugin/index.d.ts +0 -1
  59. package/dist/plugin/index.d.ts.map +1 -1
  60. package/dist/plugin/index.js +0 -1
  61. package/dist/plugin/index.js.map +1 -1
  62. package/dist/struct/CustomPlugin.d.ts +0 -41
  63. package/dist/struct/CustomPlugin.d.ts.map +1 -1
  64. package/dist/struct/CustomPlugin.js +0 -34
  65. package/dist/struct/CustomPlugin.js.map +1 -1
  66. package/dist/struct/DisTubeError.d.ts +0 -1
  67. package/dist/struct/DisTubeError.d.ts.map +1 -1
  68. package/dist/struct/DisTubeError.js +0 -2
  69. package/dist/struct/DisTubeError.js.map +1 -1
  70. package/dist/struct/ExtractorPlugin.d.ts +0 -32
  71. package/dist/struct/ExtractorPlugin.d.ts.map +1 -1
  72. package/dist/struct/ExtractorPlugin.js +0 -23
  73. package/dist/struct/ExtractorPlugin.js.map +1 -1
  74. package/dist/struct/Playlist.d.ts +0 -36
  75. package/dist/struct/Playlist.d.ts.map +1 -1
  76. package/dist/struct/Playlist.js +3 -54
  77. package/dist/struct/Playlist.js.map +1 -1
  78. package/dist/struct/Plugin.d.ts +0 -58
  79. package/dist/struct/Plugin.d.ts.map +1 -1
  80. package/dist/struct/Plugin.js +0 -62
  81. package/dist/struct/Plugin.js.map +1 -1
  82. package/dist/struct/Queue.d.ts +10 -177
  83. package/dist/struct/Queue.d.ts.map +1 -1
  84. package/dist/struct/Queue.js +49 -256
  85. package/dist/struct/Queue.js.map +1 -1
  86. package/dist/struct/SearchResult.d.ts +0 -8
  87. package/dist/struct/SearchResult.d.ts.map +1 -1
  88. package/dist/struct/SearchResult.js +0 -47
  89. package/dist/struct/SearchResult.js.map +1 -1
  90. package/dist/struct/Song.d.ts +0 -38
  91. package/dist/struct/Song.d.ts.map +1 -1
  92. package/dist/struct/Song.js +3 -122
  93. package/dist/struct/Song.js.map +1 -1
  94. package/dist/struct/TaskQueue.d.ts +0 -20
  95. package/dist/struct/TaskQueue.d.ts.map +1 -1
  96. package/dist/struct/TaskQueue.js +0 -25
  97. package/dist/struct/TaskQueue.js.map +1 -1
  98. package/dist/tsconfig.tsbuildinfo +1 -1
  99. package/dist/type.d.ts +6 -75
  100. package/dist/type.d.ts.map +1 -1
  101. package/dist/type.js.map +1 -1
  102. package/dist/util.d.ts +1 -30
  103. package/dist/util.d.ts.map +1 -1
  104. package/dist/util.js +16 -59
  105. package/dist/util.js.map +1 -1
  106. package/package.json +22 -14
  107. package/dist/core/voice/DJSAdapter.d.ts +0 -4
  108. package/dist/core/voice/DJSAdapter.d.ts.map +0 -1
  109. package/dist/core/voice/DJSAdapter.js +0 -58
  110. package/dist/core/voice/DJSAdapter.js.map +0 -1
  111. package/dist/plugin/youtube-dl.d.ts +0 -12
  112. package/dist/plugin/youtube-dl.d.ts.map +0 -1
  113. package/dist/plugin/youtube-dl.js +0 -70
  114. package/dist/plugin/youtube-dl.js.map +0 -1
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  <img alt="node-current" src="https://img.shields.io/node/v/distube?logo=node.js&logoColor=white&style=flat-square">
8
8
  <img alt="npm peer dependency version" src="https://img.shields.io/npm/dependency-version/distube/peer/discord.js?label=discord.js&logo=discord&logoColor=white&style=flat-square">
9
9
  <img alt="Depfu" src="https://img.shields.io/depfu/skick1234/DisTube?style=flat-square">
10
- <img alt="Codecov branch" src="https://img.shields.io/codecov/c/github/skick1234/DisTube?logo=codecov&logoColor=white&style=flat-square&token=WWDYRRSEQW">
10
+ <img alt="Codecov branch" src="https://img.shields.io/codecov/c/github/skick1234/DisTube/main?logo=codecov&logoColor=white&style=flat-square&token=WWDYRRSEQW">
11
11
  <br>
12
12
  <img alt="npm" src="https://img.shields.io/npm/dt/distube?logo=npm&style=flat-square">
13
13
  <img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/skick1234/DisTube?logo=github&logoColor=white&style=flat-square">
@@ -25,25 +25,24 @@ A Discord.js module to simplify your music commands and play songs with audio fi
25
25
 
26
26
  - Build on `@discordjs/voice`
27
27
  - Easy to use and customize
28
- - Support YouTube, SoundCloud, Facebook, and [700+ more sites](https://ytdl-org.github.io/youtube-dl/supportedsites.html)
28
+ - Support YouTube and audio link
29
29
  - Audio filters (bassboost, nightcore, vaporwave,...)
30
30
  - Autoplay related songs
31
31
  - Plugin system to support more sites ([Plugin List](https://distube.js.org/#/docs/DisTube/stable/plugin/list))
32
32
 
33
- ### Requirement
33
+ ## Requirement
34
34
 
35
- - Node v12 or higher
36
- - [discord.js](https://discord.js.org) v12 or **v13 _(Recommended)_**
35
+ - Node.js 16.9.0 or higher
36
+ - [discord.js](https://discord.js.org) v14
37
37
  - [@discordjs/voice](https://github.com/discordjs/voice)
38
38
  - [FFmpeg](https://www.ffmpeg.org/download.html)
39
39
  - [@discordjs/opus](https://github.com/discordjs/opus)
40
40
  - [sodium](https://www.npmjs.com/package/sodium) or [libsodium-wrappers](https://www.npmjs.com/package/libsodium-wrappers)
41
- - [python](https://www.python.org/) _(Optional - For [`youtube-dl`](https://youtube-dl.org/) to support [700+ more sites](https://ytdl-org.github.io/youtube-dl/supportedsites.html).)_
42
41
 
43
42
  ## Installation
44
43
 
45
44
  ```npm
46
- npm install distube@latest
45
+ npm install distube@dev
47
46
  ```
48
47
 
49
48
  ## Documentation
@@ -61,4 +60,3 @@ Read DisTube's definitions, properties and events details in the [Documentation
61
60
  - [node-ytdl-core](https://github.com/fent/node-ytdl-core): YouTube scraper ([DisTube Fork](https://github.com/distubejs/node-ytdl-core))
62
61
  - [node-ytsr](https://github.com/TimeForANinja/node-ytsr): YouTube search scraper ([DisTube Fork](https://github.com/distubejs/ytsr))
63
62
  - [node-ytpl](https://github.com/TimeForANinja/node-ytpl): YouTube playlist resolver ([DisTube Fork](https://github.com/distubejs/ytpl))
64
- - [youtube-dl-exec](https://github.com/microlinkhq/youtube-dl-exec): [`youtube-dl`](https://youtube-dl.org/) wrapper
package/dist/DisTube.d.ts CHANGED
@@ -3,10 +3,6 @@ import { DisTubeHandler, DisTubeVoiceManager, Options, Playlist, Queue, QueueMan
3
3
  import type { Client, GuildMember, GuildTextBasedChannel, Message, VoiceBasedChannel } from "discord.js";
4
4
  import type { CustomPlugin, DisTubeEvents, DisTubeOptions, ExtractorPlugin, Filters, GuildIdResolvable } from ".";
5
5
  export declare const version: string;
6
- /**
7
- * DisTube class
8
- * @extends EventEmitter
9
- */
10
6
  export declare class DisTube extends TypedEmitter<DisTubeEvents> {
11
7
  readonly handler: DisTubeHandler;
12
8
  readonly options: Options;
@@ -16,60 +12,9 @@ export declare class DisTube extends TypedEmitter<DisTubeEvents> {
16
12
  readonly extractorPlugins: ExtractorPlugin[];
17
13
  readonly customPlugins: CustomPlugin[];
18
14
  readonly filters: Filters;
19
- /**
20
- * Create a new DisTube class.
21
- * @param {Discord.Client} client Discord.JS client
22
- * @param {DisTubeOptions} [otp] Custom DisTube options
23
- * @example
24
- * const Discord = require('discord.js'),
25
- * DisTube = require('distube'),
26
- * client = new Discord.Client();
27
- * // Create a new DisTube
28
- * const distube = new DisTube.default(client, { searchSongs: 10 });
29
- * // client.DisTube = distube // make it access easily
30
- * client.login("Your Discord Bot Token")
31
- */
32
15
  constructor(client: Client, otp?: DisTubeOptions);
33
16
  static get version(): string;
34
- /**
35
- * DisTube version
36
- * @type {string}
37
- */
38
17
  get version(): string;
39
- /**
40
- * Play / add a song or playlist from url. Search and play a song if it is not a valid url.
41
- *
42
- * @param {Discord.BaseGuildVoiceChannel} voiceChannel The voice channel will be joined
43
- * @param {string|Song|SearchResult|Playlist} song URL | Search string |
44
- * {@link Song} | {@link SearchResult} | {@link Playlist}
45
- * @param {Object} [options] Optional options
46
- * @param {boolean} [options.skip=false]
47
- * Skip the playing song (if exists) and play the added song/playlist if `position` is 1.
48
- * If `position` is defined and not equal to 1, it will skip to the next song instead of the added song
49
- * @param {number} [options.position=0] Position of the song/playlist to add to the queue,
50
- * <= 0 to add to the end of the queue.
51
- * @param {boolean} [options.unshift=false] (DEPRECATED) Add the song/playlist to the beginning of the queue
52
- * (after the playing song if exists)
53
- * @param {Discord.GuildMember} [options.member] Requested user (default is your bot)
54
- * @param {Discord.BaseGuildTextChannel} [options.textChannel] Default {@link Queue#textChannel}
55
- * @param {Discord.Message} [options.message] Called message (For built-in search events. If this is a {@link https://developer.mozilla.org/en-US/docs/Glossary/Falsy|falsy value}, it will play the first result instead)
56
- * @param {*} [options.metadata] Optional metadata that can be attached to the song/playlist will be played,
57
- * This is useful for identification purposes when the song/playlist is passed around in events.
58
- * See {@link Song#metadata} or {@link Playlist#metadata}
59
- * @example
60
- * client.on('message', (message) => {
61
- * if (!message.content.startsWith(config.prefix)) return;
62
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
63
- * const command = args.shift();
64
- * if (command == "play")
65
- * distube.play(message.member.voice?.channel, args.join(" "), {
66
- * member: message.member,
67
- * textChannel: message.channel,
68
- * message
69
- * });
70
- * });
71
- * @returns {Promise<void>}
72
- */
73
18
  play(voiceChannel: VoiceBasedChannel, song: string | Song | SearchResult | Playlist, options?: {
74
19
  skip?: boolean;
75
20
  position?: number;
@@ -78,521 +23,32 @@ export declare class DisTube extends TypedEmitter<DisTubeEvents> {
78
23
  message?: Message;
79
24
  metadata?: any;
80
25
  }): Promise<void>;
81
- /** @deprecated Message parameter is deprecated, use VoiceChannel instead. */
82
- play(message: Message<true>, song: string | Song | SearchResult | Playlist, options?: {
83
- skip?: boolean;
84
- unshift?: boolean;
85
- metadata?: any;
86
- }): Promise<void>;
87
- /** @deprecated `options.unshift` is deprecated, use `options.position` instead */
88
- play(voiceChannel: VoiceBasedChannel, song: string | Song | SearchResult | Playlist, options?: {
89
- skip?: boolean;
90
- /** @deprecated Use `options.position` instead */
91
- unshift?: boolean;
92
- position?: number;
93
- member?: GuildMember;
94
- textChannel?: GuildTextBasedChannel;
95
- message?: Message;
96
- metadata?: any;
97
- }): Promise<void>;
98
- /**
99
- * Play / add a song or playlist from url. Search and play a song if it is not a valid url.
100
- *
101
- * @returns {Promise<void>}
102
- * @param {Discord.BaseGuildVoiceChannel} voiceChannel The voice channel will be joined
103
- * @param {string|Song|SearchResult|Playlist} song URL | Search string |
104
- * {@link Song} | {@link SearchResult} | {@link Playlist}
105
- * @param {Object} [options] Optional options
106
- * @param {boolean} [options.skip=false]
107
- * Skip the playing song (if exists) and play the added song/playlist if `position` is 1.
108
- * If `position` is defined and not equal to 1, it will skip to the next song instead of the added song
109
- * @param {number} [options.position=0] Position of the song/playlist to add to the queue,
110
- * <= 0 to add to the end of the queue.
111
- * @param {boolean} [options.unshift=false] (DEPRECATED) Add the song/playlist to the beginning of the queue
112
- * (after the playing song if exists)
113
- * @param {Discord.GuildMember} [options.member] Requested user (default is your bot)
114
- * @param {Discord.BaseGuildTextChannel} [options.textChannel] Default {@link Queue#textChannel}
115
- * @param {Discord.Message} [options.message] Called message (For built-in search events. If this is a {@link https://developer.mozilla.org/en-US/docs/Glossary/Falsy|falsy value}, it will play the first result instead)
116
- * @param {*} [options.metadata] Optional metadata that can be attached to the song/playlist will be played,
117
- * This is useful for identification purposes when the song/playlist is passed around in events.
118
- * See {@link Song#metadata} or {@link Playlist#metadata}
119
- * @deprecated Use {@link DisTube#play} instead
120
- */
121
- playVoiceChannel(voiceChannel: VoiceBasedChannel, song: string | Song | SearchResult | Playlist, options?: {
122
- skip?: boolean;
123
- unshift?: boolean;
124
- position?: number;
125
- member?: GuildMember;
126
- textChannel?: GuildTextBasedChannel;
127
- message?: Message;
128
- metadata?: any;
129
- }): Promise<void>;
130
- /**
131
- * Create a custom playlist
132
- * @returns {Promise<Playlist>}
133
- * @param {Array<string|Song|SearchResult>} songs Array of url, Song or SearchResult
134
- * @param {Object} [options] Optional options
135
- * @param {Discord.GuildMember} [options.message] A message from guild channel | A guild member
136
- * @param {Object} [options.properties] Additional properties such as `name`
137
- * @param {boolean} [options.parallel=true] Whether or not fetch the songs in parallel
138
- * @param {*} [options.metadata] Metadata
139
- * @example
140
- * const songs = ["https://www.youtube.com/watch?v=xxx", "https://www.youtube.com/watch?v=yyy"];
141
- * const playlist = await distube.createCustomPlaylist(songs, {
142
- * member: message.member,
143
- * properties: { name: "My playlist name" },
144
- * parallel: true
145
- * });
146
- * distube.play(voiceChannel, playlist, { ... });
147
- */
148
26
  createCustomPlaylist(songs: (string | Song | SearchResult)[], options?: {
149
27
  member?: GuildMember;
150
28
  properties?: Record<string, any>;
151
29
  parallel?: boolean;
152
30
  metadata?: any;
153
31
  }): Promise<Playlist>;
154
- /**
155
- * <info>Shorthand method of {@link DisTube#createCustomPlaylist} and {@link DisTube#play}
156
- *
157
- * If you doesn't have a user message (interaction,...),
158
- * see {@link DisTube#createCustomPlaylist} example</info>
159
- *
160
- * Play or add array of video urls.
161
- * {@link DisTube#event:playSong} or {@link DisTube#event:addList} will be emitted
162
- * with `playlist`'s properties include `properties` parameter's properties such as
163
- * `user`, `songs`, `duration`, `formattedDuration`, `thumbnail` like {@link Playlist}
164
- * @returns {Promise<void>}
165
- * @param {Discord.Message} message A message from guild channel
166
- * @param {Array<string|Song|SearchResult>} songs Array of url, Song or SearchResult
167
- * @param {Object} [properties={}] Additional properties for playlist such as `name`
168
- * @param {Object} [options] Optional options
169
- * @param {boolean} [options.skip=false] Skip the playing song (if exists) and play the added song/playlist instantly
170
- * @param {boolean} [options.unshift=false] Add the song/playlist to the beginning of the queue
171
- * (after the playing song if exists)
172
- * @param {boolean} [options.parallel=true] Whether or not fetch the songs in parallel
173
- * @deprecated Use {@link DisTube#createCustomPlaylist} and {@link DisTube#play} instead
174
- */
175
- playCustomPlaylist(message: Message<true>, songs: Array<string | Song | SearchResult>, properties?: Record<string, any>, options?: {
176
- skip?: boolean;
177
- /** @deprecated */
178
- unshift?: boolean;
179
- position?: number;
180
- parallel?: boolean;
181
- metadata?: any;
182
- }): Promise<void>;
183
- /**
184
- * Search for a song. You can customize how user answers instead of send a number.
185
- * Then use {@link DisTube#play} to play it.
186
- *
187
- * @param {string} string The string search for
188
- * @param {Object} options Search options
189
- * @param {number} [options.limit=10] Limit the results
190
- * @param {'video'|'playlist'} [options.type='video'] Type of results (`video` or `playlist`).
191
- * @param {boolean} [options.safeSearch=false] Whether or not use safe search (YouTube restricted mode)
192
- * @throws {Error}
193
- * @returns {Promise<Array<SearchResult>>} Array of results
194
- */
195
32
  search(string: string, options?: {
196
33
  type?: "video" | "playlist";
197
34
  limit?: number;
198
35
  safeSearch?: boolean;
199
36
  retried?: boolean;
200
37
  }): Promise<Array<SearchResult>>;
201
- /**
202
- * Get the guild queue
203
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
204
- * @returns {Queue?}
205
- * @throws {Error}
206
- * @example
207
- * client.on('message', (message) => {
208
- * if (!message.content.startsWith(config.prefix)) return;
209
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
210
- * const command = args.shift();
211
- * if (command == "queue") {
212
- * const queue = distube.getQueue(message);
213
- * message.channel.send('Current queue:\n' + queue.songs.map((song, id) =>
214
- * `**${id+1}**. [${song.name}](${song.url}) - \`${song.formattedDuration}\``
215
- * ).join("\n"));
216
- * }
217
- * });
218
- */
219
- getQueue(queue: GuildIdResolvable): Queue | undefined;
220
- /**
221
- * Pause the guild stream
222
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
223
- * @returns {Queue} The guild queue
224
- * @throws {Error}
225
- */
226
- pause(queue: GuildIdResolvable): Queue;
227
- /**
228
- * Resume the guild stream
229
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
230
- * @returns {Queue} The guild queue
231
- * @throws {Error}
232
- */
233
- resume(queue: GuildIdResolvable): Queue;
234
- /**
235
- * Stop the guild stream
236
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
237
- * @returns {Promise<void>}
238
- * @throws {Error}
239
- * @example
240
- * client.on('message', (message) => {
241
- * if (!message.content.startsWith(config.prefix)) return;
242
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
243
- * const command = args.shift();
244
- * if (command == "stop") {
245
- * distube.stop(message);
246
- * message.channel.send("Stopped the queue!");
247
- * }
248
- * });
249
- */
250
- stop(queue: GuildIdResolvable): Promise<void>;
251
- /**
252
- * Set the guild stream's volume
253
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
254
- * @param {number} percent The percentage of volume you want to set
255
- * @returns {Queue} The guild queue
256
- * @throws {Error}
257
- * @example
258
- * client.on('message', (message) => {
259
- * if (!message.content.startsWith(config.prefix)) return;
260
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
261
- * const command = args.shift();
262
- * if (command == "volume")
263
- * distube.setVolume(message, Number(args[0]));
264
- * });
265
- */
266
- setVolume(queue: GuildIdResolvable, percent: number): Queue;
267
- /**
268
- * Skip the playing song if there is a next song in the queue.
269
- * <info>If {@link Queue#autoplay} is `true` and there is no up next song,
270
- * DisTube will add and play a related song.</info>
271
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
272
- * @returns {Promise<Song>} The new Song will be played
273
- * @throws {Error}
274
- * @example
275
- * client.on('message', (message) => {
276
- * if (!message.content.startsWith(config.prefix)) return;
277
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
278
- * const command = args.shift();
279
- * if (command == "skip")
280
- * distube.skip(message);
281
- * });
282
- */
283
- skip(queue: GuildIdResolvable): Promise<Song>;
284
- /**
285
- * Play the previous song
286
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
287
- * @returns {Promise<Song>} The new Song will be played
288
- * @throws {Error}
289
- * @example
290
- * client.on('message', (message) => {
291
- * if (!message.content.startsWith(config.prefix)) return;
292
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
293
- * const command = args.shift();
294
- * if (command == "previous")
295
- * distube.previous(message);
296
- * });
297
- */
298
- previous(queue: GuildIdResolvable): Promise<Song>;
299
- /**
300
- * Shuffle the guild queue songs
301
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
302
- * @returns {Promise<Queue>} The guild queue
303
- * @example
304
- * client.on('message', (message) => {
305
- * if (!message.content.startsWith(config.prefix)) return;
306
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
307
- * const command = args.shift();
308
- * if (command == "shuffle")
309
- * distube.shuffle(message);
310
- * });
311
- */
312
- shuffle(queue: GuildIdResolvable): Promise<Queue>;
313
- /**
314
- * Jump to the song number in the queue.
315
- * The next one is 1, 2,...
316
- * The previous one is -1, -2,...
317
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
318
- * @param {number} num The song number to play
319
- * @returns {Promise<Queue>} The guild queue
320
- * @throws {Error} if `num` is invalid number (0 < num < {@link Queue#songs}.length)
321
- * @example
322
- * client.on('message', (message) => {
323
- * if (!message.content.startsWith(config.prefix)) return;
324
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
325
- * const command = args.shift();
326
- * if (command == "jump")
327
- * distube.jump(message, parseInt(args[0]))
328
- * .catch(err => message.channel.send("Invalid song number."));
329
- * });
330
- */
331
- jump(queue: GuildIdResolvable, num: number): Promise<Queue>;
332
- /**
333
- * Set the repeat mode of the guild queue.\
334
- * Toggle mode `(Disabled -> Song -> Queue -> Disabled ->...)` if `mode` is `undefined`
335
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
336
- * @param {RepeatMode?} [mode] The repeat modes (toggle if `undefined`)
337
- * @returns {RepeatMode} The new repeat mode
338
- * @example
339
- * client.on('message', (message) => {
340
- * if (!message.content.startsWith(config.prefix)) return;
341
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
342
- * const command = args.shift();
343
- * if (command == "repeat") {
344
- * let mode = distube.setRepeatMode(message, parseInt(args[0]));
345
- * mode = mode ? mode == 2 ? "Repeat queue" : "Repeat song" : "Off";
346
- * message.channel.send("Set repeat mode to `" + mode + "`");
347
- * }
348
- * });
349
- * @example
350
- * const { RepeatMode } = require("distube");
351
- * let mode;
352
- * switch(distube.setRepeatMode(message, parseInt(args[0]))) {
353
- * case RepeatMode.DISABLED:
354
- * mode = "Off";
355
- * break;
356
- * case RepeatMode.SONG:
357
- * mode = "Repeat a song";
358
- * break;
359
- * case RepeatMode.QUEUE:
360
- * mode = "Repeat all queue";
361
- * break;
362
- * }
363
- * message.channel.send("Set repeat mode to `" + mode + "`");
364
- */
365
- setRepeatMode(queue: GuildIdResolvable, mode?: number): number;
366
- /**
367
- * Toggle autoplay mode
368
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
369
- * @returns {boolean} Autoplay mode state
370
- * @throws {Error}
371
- * @example
372
- * client.on('message', (message) => {
373
- * if (!message.content.startsWith(config.prefix)) return;
374
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
375
- * const command = args.shift();
376
- * if (command == "autoplay") {
377
- * const mode = distube.toggleAutoplay(message);
378
- * message.channel.send("Set autoplay mode to `" + (mode ? "On" : "Off") + "`");
379
- * }
380
- * });
381
- */
382
- toggleAutoplay(queue: GuildIdResolvable): boolean;
383
- /**
384
- * Add related song to the queue
385
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
386
- * @returns {Promise<Song>} The guild queue
387
- */
388
- addRelatedSong(queue: GuildIdResolvable): Promise<Song>;
389
- /**
390
- * Enable or disable filter(s) of the queue.
391
- * Available filters: {@link Filters}
392
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
393
- * @param {string|false} filter A filter name, `false` to clear all the filters
394
- * @param {boolean} [force=false] Force enable the input filter(s) even if it's enabled
395
- * @returns {Array<string>} Enabled filters.
396
- * @example
397
- * client.on('message', (message) => {
398
- * if (!message.content.startsWith(config.prefix)) return;
399
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
400
- * const command = args.shift();
401
- * if ([`3d`, `bassboost`, `echo`, `karaoke`, `nightcore`, `vaporwave`].includes(command)) {
402
- * const filter = distube.setFilter(message, command);
403
- * message.channel.send("Current queue filter: " + (filter.join(", ") || "Off"));
404
- * }
405
- * });
406
- */
407
- setFilter(queue: GuildIdResolvable, filter: string | false, force?: boolean): Array<string>;
408
- /**
409
- * Set the playing time to another position
410
- * @param {GuildIdResolvable} queue The type can be resolved to give a {@link Queue}
411
- * @param {number} time Time in seconds
412
- * @returns {Queue} Seeked queue
413
- * @example
414
- * client.on('message', message => {
415
- * if (!message.content.startsWith(config.prefix)) return;
416
- * const args = message.content.slice(config.prefix.length).trim().split(/ +/g);
417
- * const command = args.shift();
418
- * if (command = 'seek')
419
- * distube.seek(message, Number(args[0]));
420
- * });
421
- */
422
- seek(queue: GuildIdResolvable, time: number): Queue;
423
- /**
424
- * Emit error event
425
- * @param {Error} error error
426
- * @param {Discord.BaseGuildTextChannel} [channel] Text channel where the error is encountered.
427
- * @private
428
- */
38
+ getQueue(guild: GuildIdResolvable): Queue | undefined;
39
+ pause(guild: GuildIdResolvable): Queue;
40
+ resume(guild: GuildIdResolvable): Queue;
41
+ stop(guild: GuildIdResolvable): Promise<void>;
42
+ setVolume(guild: GuildIdResolvable, percent: number): Queue;
43
+ skip(guild: GuildIdResolvable): Promise<Song>;
44
+ previous(guild: GuildIdResolvable): Promise<Song>;
45
+ shuffle(guild: GuildIdResolvable): Promise<Queue>;
46
+ jump(guild: GuildIdResolvable, num: number): Promise<Song>;
47
+ setRepeatMode(guild: GuildIdResolvable, mode?: number): number;
48
+ toggleAutoplay(guild: GuildIdResolvable): boolean;
49
+ addRelatedSong(guild: GuildIdResolvable): Promise<Song>;
50
+ seek(guild: GuildIdResolvable, time: number): Queue;
429
51
  emitError(error: Error, channel?: GuildTextBasedChannel): void;
430
52
  }
431
53
  export default DisTube;
432
- /**
433
- * Emitted after DisTube add a new playlist to the playing {@link Queue}.
434
- *
435
- * @event DisTube#addList
436
- * @param {Queue} queue The guild queue
437
- * @param {Playlist} playlist Playlist info
438
- * @example
439
- * distube.on("addList", (queue, playlist) => queue.textChannel.send(
440
- * `Added \`${playlist.name}\` playlist (${playlist.songs.length} songs) to the queue!`
441
- * ));
442
- */
443
- /**
444
- * Emitted after DisTube add a new song to the playing {@link Queue}.
445
- *
446
- * @event DisTube#addSong
447
- * @param {Queue} queue The guild queue
448
- * @param {Song} song Added song
449
- * @example
450
- * distube.on("addSong", (queue, song) => queue.textChannel.send(
451
- * `Added ${song.name} - \`${song.formattedDuration}\` to the queue by ${song.user}.`
452
- * ));
453
- */
454
- /**
455
- * Emitted when there is no user in the voice channel,
456
- * {@link DisTubeOptions}.leaveOnEmpty is `true` and there is a playing queue.
457
- *
458
- * If there is no playing queue (stopped and {@link DisTubeOptions}.leaveOnStop is `false`),
459
- * it will leave the channel without emitting this event.
460
- * @event DisTube#empty
461
- * @param {Queue} queue The guild queue
462
- * @example
463
- * distube.on("empty", queue => queue.textChannel.send("Channel is empty. Leaving the channel"))
464
- */
465
- /**
466
- * Emitted when DisTube encounters an error.
467
- *
468
- * @event DisTube#error
469
- * @param {Discord.BaseGuildTextChannel} channel Text channel where the error is encountered.
470
- * @param {Error} error The error encountered
471
- * @example
472
- * distube.on("error", (channel, error) => channel.send(
473
- * "An error encountered: " + error
474
- * ));
475
- */
476
- /**
477
- * Emitted when there is no more song in the queue and {@link Queue#autoplay} is `false`.
478
- * DisTube will leave voice channel if {@link DisTubeOptions}.leaveOnFinish is `true`.
479
- *
480
- * @event DisTube#finish
481
- * @param {Queue} queue The guild queue
482
- * @example
483
- * distube.on("finish", queue => queue.textChannel.send("No more song in queue"));
484
- */
485
- /**
486
- * Emitted when DisTube initialize a queue to change queue default properties.
487
- *
488
- * @event DisTube#initQueue
489
- * @param {Queue} queue The guild queue
490
- * @example
491
- * distube.on("initQueue", queue => {
492
- * queue.autoplay = false;
493
- * queue.volume = 100;
494
- * });
495
- */
496
- /**
497
- * Emitted when {@link Queue#autoplay} is `true`, {@link Queue#songs} is empty,
498
- * and DisTube cannot find related songs to play.
499
- *
500
- * @event DisTube#noRelated
501
- * @param {Queue} queue The guild queue
502
- * @example
503
- * distube.on("noRelated", queue => queue.textChannel.send("Can't find related video to play."));
504
- */
505
- /**
506
- * Emitted when DisTube play a song.
507
- *
508
- * If {@link DisTubeOptions}.emitNewSongOnly is `true`,
509
- * this event is not emitted when looping a song or next song is the previous one.
510
- *
511
- * @event DisTube#playSong
512
- * @param {Queue} queue The guild queue
513
- * @param {Song} song Playing song
514
- * @example
515
- * distube.on("playSong", (queue, song) => queue.textChannel.send(
516
- * `Playing \`${song.name}\` - \`${song.formattedDuration}\`\nRequested by: ${song.user}`
517
- * ));
518
- */
519
- /**
520
- * Emitted when DisTube cannot find any results for the query.
521
- *
522
- * @event DisTube#searchNoResult
523
- * @param {Discord.Message} message The user message called play method
524
- * @param {string} query The search query
525
- * @example
526
- * distube.on("searchNoResult", (message, query) => message.channel.send(`No result found for ${query}!`));
527
- */
528
- /**
529
- * Emitted when {@link DisTubeOptions|DisTubeOptions.searchSongs} bigger than 0,
530
- * and song param of {@link DisTube#play} is invalid url.
531
- * DisTube will wait for user's next message to choose a song manually.
532
- * <info>{@link https://support.google.com/youtube/answer/7354993|Safe search} is enabled
533
- * if {@link DisTubeOptions}.nsfw is disabled and the message's channel is not a nsfw channel.</info>
534
- *
535
- * @event DisTube#searchResult
536
- * @param {Discord.Message} message The user message called play method
537
- * @param {Array<SearchResult>} results Searched results
538
- * @param {string} query The search query
539
- * @example
540
- * // DisTubeOptions.searchSongs > 0
541
- * distube.on("searchResult", (message, results) => {
542
- * message.channel.send(`**Choose an option from below**\n${
543
- * results.map((song, i) => `**${i + 1}**. ${song.name} - \`${song.formattedDuration}\``).join("\n")
544
- * }\n*Enter anything else or wait 60 seconds to cancel*`);
545
- * });
546
- */
547
- /**
548
- * Emitted when {@link DisTubeOptions|DisTubeOptions.searchSongs} bigger than 0,
549
- * and the search canceled due to {@link DisTubeOptions|DisTubeOptions.searchTimeout}.
550
- *
551
- * @event DisTube#searchCancel
552
- * @param {Discord.Message} message The user message called play method
553
- * @param {string} query The search query
554
- * @example
555
- * // DisTubeOptions.searchSongs > 0
556
- * distube.on("searchCancel", (message) => message.channel.send(`Searching canceled`));
557
- */
558
- /**
559
- * Emitted when {@link DisTubeOptions|DisTubeOptions.searchSongs} bigger than 0,
560
- * and the search canceled due to user's next message is not a number or out of results range.
561
- *
562
- * @event DisTube#searchInvalidAnswer
563
- * @param {Discord.Message} message The user message called play method
564
- * @param {Discord.Message} answer The answered message of user
565
- * @param {string} query The search query
566
- * @example
567
- * // DisTubeOptions.searchSongs > 0
568
- * distube.on("searchInvalidAnswer", (message) => message.channel.send(`You answered an invalid number!`));
569
- */
570
- /**
571
- * Emitted when {@link DisTubeOptions|DisTubeOptions.searchSongs} bigger than 0,
572
- * and after the user chose a search result to play.
573
- *
574
- * @event DisTube#searchDone
575
- * @param {Discord.Message} message The user message called play method
576
- * @param {Discord.Message} answer The answered message of user
577
- * @param {string} query The search query
578
- */
579
- /**
580
- * Emitted when the bot is disconnected to a voice channel.
581
- *
582
- * @event DisTube#disconnect
583
- * @param {Queue} queue The guild queue
584
- */
585
- /**
586
- * Emitted when a {@link Queue} is deleted with any reasons.
587
- *
588
- * @event DisTube#deleteQueue
589
- * @param {Queue} queue The guild queue
590
- */
591
- /**
592
- * Emitted when DisTube finished a song.
593
- *
594
- * @event DisTube#finishSong
595
- * @param {Queue} queue The guild queue
596
- * @param {Song} song Finished song
597
- */
598
54
  //# sourceMappingURL=DisTube.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DisTube.d.ts","sourceRoot":"","sources":["../src/DisTube.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAEL,cAAc,EACd,mBAAmB,EAGnB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,IAAI,EAQL,MAAM,GAAG,CAAC;AACX,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,OAAO,EAAe,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACtH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,GAAG,CAAC;AAMlH,eAAO,MAAQ,OAAO,QAAoD,CAAC;AAE3E;;;GAGG;AACH,qBAAa,OAAQ,SAAQ,YAAY,CAAC,aAAa,CAAC;IACtD,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,QAAQ,CAAC,gBAAgB,EAAE,eAAe,EAAE,CAAC;IAC7C,QAAQ,CAAC,aAAa,EAAE,YAAY,EAAE,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;;;;;;;;;;;OAYG;gBAC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