distube 4.0.0-dev.0 → 4.0.0-dev.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/README.md +1 -1
- package/dist/index.d.ts +593 -8
- package/dist/index.js +2360 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2300 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +79 -43
- package/dist/DisTube.d.ts +0 -521
- package/dist/DisTube.d.ts.map +0 -1
- package/dist/DisTube.js +0 -793
- package/dist/DisTube.js.map +0 -1
- package/dist/constant.d.ts +0 -124
- package/dist/constant.d.ts.map +0 -1
- package/dist/constant.js +0 -144
- package/dist/constant.js.map +0 -1
- package/dist/core/DisTubeBase.d.ts +0 -54
- package/dist/core/DisTubeBase.d.ts.map +0 -1
- package/dist/core/DisTubeBase.js +0 -75
- package/dist/core/DisTubeBase.js.map +0 -1
- package/dist/core/DisTubeHandler.d.ts +0 -93
- package/dist/core/DisTubeHandler.d.ts.map +0 -1
- package/dist/core/DisTubeHandler.js +0 -292
- package/dist/core/DisTubeHandler.js.map +0 -1
- package/dist/core/DisTubeOptions.d.ts +0 -23
- package/dist/core/DisTubeOptions.d.ts.map +0 -1
- package/dist/core/DisTubeOptions.js +0 -90
- package/dist/core/DisTubeOptions.js.map +0 -1
- package/dist/core/DisTubeStream.d.ts +0 -52
- package/dist/core/DisTubeStream.d.ts.map +0 -1
- package/dist/core/DisTubeStream.js +0 -108
- package/dist/core/DisTubeStream.js.map +0 -1
- package/dist/core/index.d.ts +0 -7
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js +0 -19
- package/dist/core/index.js.map +0 -1
- package/dist/core/manager/BaseManager.d.ts +0 -22
- package/dist/core/manager/BaseManager.d.ts.map +0 -1
- package/dist/core/manager/BaseManager.js +0 -42
- package/dist/core/manager/BaseManager.js.map +0 -1
- package/dist/core/manager/QueueManager.d.ts +0 -33
- package/dist/core/manager/QueueManager.d.ts.map +0 -1
- package/dist/core/manager/QueueManager.js +0 -193
- package/dist/core/manager/QueueManager.js.map +0 -1
- package/dist/core/manager/index.d.ts +0 -3
- package/dist/core/manager/index.d.ts.map +0 -1
- package/dist/core/manager/index.js +0 -15
- package/dist/core/manager/index.js.map +0 -1
- package/dist/core/voice/DisTubeVoice.d.ts +0 -82
- package/dist/core/voice/DisTubeVoice.d.ts.map +0 -1
- package/dist/core/voice/DisTubeVoice.js +0 -250
- package/dist/core/voice/DisTubeVoice.js.map +0 -1
- package/dist/core/voice/DisTubeVoiceManager.d.ts +0 -41
- package/dist/core/voice/DisTubeVoiceManager.d.ts.map +0 -1
- package/dist/core/voice/DisTubeVoiceManager.js +0 -67
- package/dist/core/voice/DisTubeVoiceManager.js.map +0 -1
- package/dist/core/voice/index.d.ts +0 -3
- package/dist/core/voice/index.d.ts.map +0 -1
- package/dist/core/voice/index.js +0 -15
- package/dist/core/voice/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/plugin/http.d.ts +0 -10
- package/dist/plugin/http.d.ts.map +0 -1
- package/dist/plugin/http.js +0 -18
- package/dist/plugin/http.js.map +0 -1
- package/dist/plugin/https.d.ts +0 -19
- package/dist/plugin/https.d.ts.map +0 -1
- package/dist/plugin/https.js +0 -47
- package/dist/plugin/https.js.map +0 -1
- package/dist/plugin/index.d.ts +0 -3
- package/dist/plugin/index.d.ts.map +0 -1
- package/dist/plugin/index.js +0 -15
- package/dist/plugin/index.js.map +0 -1
- package/dist/struct/CustomPlugin.d.ts +0 -51
- package/dist/struct/CustomPlugin.d.ts.map +0 -1
- package/dist/struct/CustomPlugin.js +0 -50
- package/dist/struct/CustomPlugin.js.map +0 -1
- package/dist/struct/DisTubeError.d.ts +0 -55
- package/dist/struct/DisTubeError.d.ts.map +0 -1
- package/dist/struct/DisTubeError.js +0 -64
- package/dist/struct/DisTubeError.js.map +0 -1
- package/dist/struct/ExtractorPlugin.d.ts +0 -45
- package/dist/struct/ExtractorPlugin.d.ts.map +0 -1
- package/dist/struct/ExtractorPlugin.js +0 -39
- package/dist/struct/ExtractorPlugin.js.map +0 -1
- package/dist/struct/Playlist.d.ts +0 -54
- package/dist/struct/Playlist.d.ts.map +0 -1
- package/dist/struct/Playlist.js +0 -131
- package/dist/struct/Playlist.js.map +0 -1
- package/dist/struct/Plugin.d.ts +0 -75
- package/dist/struct/Plugin.d.ts.map +0 -1
- package/dist/struct/Plugin.js +0 -99
- package/dist/struct/Plugin.js.map +0 -1
- package/dist/struct/Queue.d.ts +0 -216
- package/dist/struct/Queue.d.ts.map +0 -1
- package/dist/struct/Queue.js +0 -479
- package/dist/struct/Queue.js.map +0 -1
- package/dist/struct/SearchResult.d.ts +0 -27
- package/dist/struct/SearchResult.d.ts.map +0 -1
- package/dist/struct/SearchResult.js +0 -77
- package/dist/struct/SearchResult.js.map +0 -1
- package/dist/struct/Song.d.ts +0 -78
- package/dist/struct/Song.d.ts.map +0 -1
- package/dist/struct/Song.js +0 -259
- package/dist/struct/Song.js.map +0 -1
- package/dist/struct/TaskQueue.d.ts +0 -28
- package/dist/struct/TaskQueue.d.ts.map +0 -1
- package/dist/struct/TaskQueue.js +0 -64
- package/dist/struct/TaskQueue.js.map +0 -1
- package/dist/struct/index.d.ts +0 -10
- package/dist/struct/index.d.ts.map +0 -1
- package/dist/struct/index.js +0 -22
- package/dist/struct/index.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/type.d.ts +0 -169
- package/dist/type.d.ts.map +0 -1
- package/dist/type.js +0 -3
- package/dist/type.js.map +0 -1
- package/dist/util.d.ts +0 -51
- package/dist/util.d.ts.map +0 -1
- package/dist/util.js +0 -225
- package/dist/util.js.map +0 -1
package/dist/struct/Plugin.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Plugin = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* DisTube Plugin
|
|
6
|
-
* @abstract
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
class Plugin {
|
|
10
|
-
init(distube) {
|
|
11
|
-
/**
|
|
12
|
-
* DisTube
|
|
13
|
-
* @type {DisTube}
|
|
14
|
-
*/
|
|
15
|
-
this.distube = distube;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Type of the plugin
|
|
19
|
-
* @name Plugin#type
|
|
20
|
-
* @type {PluginType}
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* Emit the {@link DisTube} of this base
|
|
24
|
-
* @param {string} eventName Event name
|
|
25
|
-
* @param {...any} args arguments
|
|
26
|
-
* @returns {boolean}
|
|
27
|
-
*/
|
|
28
|
-
emit(eventName, ...args) {
|
|
29
|
-
return this.distube.emit(eventName, ...args);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Emit error event
|
|
33
|
-
* @param {Error} error error
|
|
34
|
-
* @param {Discord.BaseGuildTextChannel} [channel] Text channel where the error is encountered.
|
|
35
|
-
*/
|
|
36
|
-
emitError(error, channel) {
|
|
37
|
-
this.distube.emitError(error, channel);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* The queue manager
|
|
41
|
-
* @type {QueueManager}
|
|
42
|
-
* @readonly
|
|
43
|
-
*/
|
|
44
|
-
get queues() {
|
|
45
|
-
return this.distube.queues;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* The voice manager
|
|
49
|
-
* @type {DisTubeVoiceManager}
|
|
50
|
-
* @readonly
|
|
51
|
-
*/
|
|
52
|
-
get voices() {
|
|
53
|
-
return this.distube.voices;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Discord.js client
|
|
57
|
-
* @type {Discord.Client}
|
|
58
|
-
* @readonly
|
|
59
|
-
*/
|
|
60
|
-
get client() {
|
|
61
|
-
return this.distube.client;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* DisTube options
|
|
65
|
-
* @type {DisTubeOptions}
|
|
66
|
-
* @readonly
|
|
67
|
-
*/
|
|
68
|
-
get options() {
|
|
69
|
-
return this.distube.options;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* DisTube handler
|
|
73
|
-
* @type {DisTubeHandler}
|
|
74
|
-
* @readonly
|
|
75
|
-
*/
|
|
76
|
-
get handler() {
|
|
77
|
-
return this.distube.handler;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Get the stream url from {@link Song#url}. Returns {@link Song#url} by default.
|
|
81
|
-
* Not needed if the plugin plays song from YouTube.
|
|
82
|
-
* @param {string} url Input url
|
|
83
|
-
* @returns {string|Promise<string>}
|
|
84
|
-
*/
|
|
85
|
-
getStreamURL(url) {
|
|
86
|
-
return url;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Get related songs from a supported url. {@link Song#member} should be `undefined`.
|
|
90
|
-
* Not needed to add {@link Song#related} because it will be added with this function later.
|
|
91
|
-
* @param {string} url Input url
|
|
92
|
-
* @returns {Song[]|Promise<Song[]>}
|
|
93
|
-
*/
|
|
94
|
-
getRelatedSongs(url) {
|
|
95
|
-
return [];
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.Plugin = Plugin;
|
|
99
|
-
//# sourceMappingURL=Plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.js","sourceRoot":"","sources":["../../src/struct/Plugin.ts"],"names":[],"mappings":";;;AAcA;;;;GAIG;AACH,MAAsB,MAAM;IAG1B,IAAI,CAAC,OAAgB;QACnB;;;WAGG;QACH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IACD;;;;OAIG;IACH;;;;;OAKG;IACH,IAAI,CAAC,SAA8B,EAAE,GAAG,IAAS;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD;;;;OAIG;IACH,SAAS,CAAC,KAAY,EAAE,OAA+B;QACrD,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IACD;;;;OAIG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,CAAC;IACD;;;;OAIG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,CAAC;IACD;;;;OAIG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IAC7B,CAAC;IACD;;;;OAIG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9B,CAAC;IACD;;;;OAIG;IACH,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC9B,CAAC;IACD;;;;;OAKG;IACH,YAAY,CAAC,GAAW;QACtB,OAAO,GAAG,CAAC;IACb,CAAC;IACD;;;;;OAKG;IACH,eAAe,CAAC,GAAW;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AA1FD,wBA0FC","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\nimport type { Client, GuildTextBasedChannel } from \"discord.js\";\nimport type {\n Awaitable,\n DisTube,\n DisTubeEvents,\n DisTubeHandler,\n DisTubeVoiceManager,\n Options,\n PluginType,\n QueueManager,\n RelatedSong,\n} from \"..\";\n\n/**\n * DisTube Plugin\n * @abstract\n * @private\n */\nexport abstract class Plugin {\n type!: PluginType;\n distube!: DisTube;\n init(distube: DisTube) {\n /**\n * DisTube\n * @type {DisTube}\n */\n this.distube = distube;\n }\n /**\n * Type of the plugin\n * @name Plugin#type\n * @type {PluginType}\n */\n /**\n * Emit the {@link DisTube} of this base\n * @param {string} eventName Event name\n * @param {...any} args arguments\n * @returns {boolean}\n */\n emit(eventName: keyof DisTubeEvents, ...args: any): boolean {\n return this.distube.emit(eventName, ...args);\n }\n /**\n * Emit error event\n * @param {Error} error error\n * @param {Discord.BaseGuildTextChannel} [channel] Text channel where the error is encountered.\n */\n emitError(error: Error, channel?: GuildTextBasedChannel) {\n this.distube.emitError(error, channel);\n }\n /**\n * The queue manager\n * @type {QueueManager}\n * @readonly\n */\n get queues(): QueueManager {\n return this.distube.queues;\n }\n /**\n * The voice manager\n * @type {DisTubeVoiceManager}\n * @readonly\n */\n get voices(): DisTubeVoiceManager {\n return this.distube.voices;\n }\n /**\n * Discord.js client\n * @type {Discord.Client}\n * @readonly\n */\n get client(): Client {\n return this.distube.client;\n }\n /**\n * DisTube options\n * @type {DisTubeOptions}\n * @readonly\n */\n get options(): Options {\n return this.distube.options;\n }\n /**\n * DisTube handler\n * @type {DisTubeHandler}\n * @readonly\n */\n get handler(): DisTubeHandler {\n return this.distube.handler;\n }\n /**\n * Get the stream url from {@link Song#url}. Returns {@link Song#url} by default.\n * Not needed if the plugin plays song from YouTube.\n * @param {string} url Input url\n * @returns {string|Promise<string>}\n */\n getStreamURL(url: string): Awaitable<string> {\n return url;\n }\n /**\n * Get related songs from a supported url. {@link Song#member} should be `undefined`.\n * Not needed to add {@link Song#related} because it will be added with this function later.\n * @param {string} url Input url\n * @returns {Song[]|Promise<Song[]>}\n */\n getRelatedSongs(url: string): Awaitable<RelatedSong[]> {\n return [];\n }\n}\n"]}
|
package/dist/struct/Queue.d.ts
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { DisTubeBase } from "../core";
|
|
3
|
-
import { RepeatMode, Song, TaskQueue } from "..";
|
|
4
|
-
import type { DisTube, DisTubeVoice, DisTubeVoiceEvents } from "..";
|
|
5
|
-
import type { GuildMember, GuildTextBasedChannel, Snowflake } from "discord.js";
|
|
6
|
-
/**
|
|
7
|
-
* Represents a queue.
|
|
8
|
-
* @extends DisTubeBase
|
|
9
|
-
*/
|
|
10
|
-
export declare class Queue extends DisTubeBase {
|
|
11
|
-
readonly id: Snowflake;
|
|
12
|
-
/**
|
|
13
|
-
* Voice connection of this queue
|
|
14
|
-
*/
|
|
15
|
-
voice: DisTubeVoice;
|
|
16
|
-
/**
|
|
17
|
-
* List of songs in the queue (The first one is the playing song)
|
|
18
|
-
*/
|
|
19
|
-
songs: Song[];
|
|
20
|
-
/**
|
|
21
|
-
* List of the previous songs.
|
|
22
|
-
*/
|
|
23
|
-
previousSongs: Song[];
|
|
24
|
-
/**
|
|
25
|
-
* Whether stream is currently stopped.
|
|
26
|
-
* @private
|
|
27
|
-
*/
|
|
28
|
-
stopped: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Whether or not the last song was skipped to next song.
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
next: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Whether or not the last song was skipped to previous song.
|
|
36
|
-
* @private
|
|
37
|
-
*/
|
|
38
|
-
prev: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Whether or not the stream is currently playing.
|
|
41
|
-
*/
|
|
42
|
-
playing: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether or not the stream is currently paused.
|
|
45
|
-
*/
|
|
46
|
-
paused: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Type of repeat mode (`0` is disabled, `1` is repeating a song, `2` is repeating all the queue).
|
|
49
|
-
* Default value: `0` (disabled)
|
|
50
|
-
*/
|
|
51
|
-
repeatMode: RepeatMode;
|
|
52
|
-
/**
|
|
53
|
-
* Whether or not the autoplay mode is enabled.
|
|
54
|
-
* Default value: `false`
|
|
55
|
-
*/
|
|
56
|
-
autoplay: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Enabled audio filters.
|
|
59
|
-
* Available filters: {@link Filters}
|
|
60
|
-
*/
|
|
61
|
-
filters: string[];
|
|
62
|
-
/**
|
|
63
|
-
* What time in the song to begin (in seconds).
|
|
64
|
-
*/
|
|
65
|
-
beginTime: number;
|
|
66
|
-
/**
|
|
67
|
-
* The text channel of the Queue. (Default: where the first command is called).
|
|
68
|
-
*/
|
|
69
|
-
textChannel?: GuildTextBasedChannel;
|
|
70
|
-
/**
|
|
71
|
-
* Timeout for checking empty channel
|
|
72
|
-
* @private
|
|
73
|
-
*/
|
|
74
|
-
emptyTimeout?: NodeJS.Timeout;
|
|
75
|
-
/**
|
|
76
|
-
* The client user as a `GuildMember` of this queue's guild
|
|
77
|
-
*/
|
|
78
|
-
clientMember: GuildMember;
|
|
79
|
-
/**
|
|
80
|
-
* Task queuing system
|
|
81
|
-
*/
|
|
82
|
-
taskQueue: TaskQueue;
|
|
83
|
-
listeners?: DisTubeVoiceEvents;
|
|
84
|
-
/**
|
|
85
|
-
* Create a queue for the guild
|
|
86
|
-
* @param {DisTube} distube DisTube
|
|
87
|
-
* @param {DisTubeVoice} voice Voice connection
|
|
88
|
-
* @param {Song|Song[]} song First song(s)
|
|
89
|
-
* @param {Discord.BaseGuildTextChannel?} textChannel Default text channel
|
|
90
|
-
*/
|
|
91
|
-
constructor(distube: DisTube, voice: DisTubeVoice, song: Song | Song[], textChannel?: GuildTextBasedChannel);
|
|
92
|
-
/**
|
|
93
|
-
* Formatted duration string.
|
|
94
|
-
* @type {string}
|
|
95
|
-
*/
|
|
96
|
-
get formattedDuration(): string;
|
|
97
|
-
/**
|
|
98
|
-
* Queue's duration.
|
|
99
|
-
* @type {number}
|
|
100
|
-
*/
|
|
101
|
-
get duration(): number;
|
|
102
|
-
/**
|
|
103
|
-
* What time in the song is playing (in seconds).
|
|
104
|
-
* @type {number}
|
|
105
|
-
*/
|
|
106
|
-
get currentTime(): number;
|
|
107
|
-
/**
|
|
108
|
-
* Formatted {@link Queue#currentTime} string.
|
|
109
|
-
* @type {string}
|
|
110
|
-
*/
|
|
111
|
-
get formattedCurrentTime(): string;
|
|
112
|
-
/**
|
|
113
|
-
* The voice channel playing in.
|
|
114
|
-
* @type {Discord.VoiceChannel|Discord.StageChannel|null}
|
|
115
|
-
*/
|
|
116
|
-
get voiceChannel(): import("discord.js").VoiceBasedChannel | null;
|
|
117
|
-
get volume(): number;
|
|
118
|
-
set volume(value: number);
|
|
119
|
-
/**
|
|
120
|
-
* @private
|
|
121
|
-
* Add a Song or an array of Song to the queue
|
|
122
|
-
* @param {Song|Song[]} song Song to add
|
|
123
|
-
* @param {number} [position=0] Position to add, <= 0 to add to the end of the queue
|
|
124
|
-
* @throws {Error}
|
|
125
|
-
* @returns {Queue} The guild queue
|
|
126
|
-
*/
|
|
127
|
-
addToQueue(song: Song | Song[], position?: number): Queue;
|
|
128
|
-
/**
|
|
129
|
-
* Pause the guild stream
|
|
130
|
-
* @returns {Queue} The guild queue
|
|
131
|
-
*/
|
|
132
|
-
pause(): Queue;
|
|
133
|
-
/**
|
|
134
|
-
* Resume the guild stream
|
|
135
|
-
* @returns {Queue} The guild queue
|
|
136
|
-
*/
|
|
137
|
-
resume(): Queue;
|
|
138
|
-
/**
|
|
139
|
-
* Set the guild stream's volume
|
|
140
|
-
* @param {number} percent The percentage of volume you want to set
|
|
141
|
-
* @returns {Queue} The guild queue
|
|
142
|
-
*/
|
|
143
|
-
setVolume(percent: number): Queue;
|
|
144
|
-
/**
|
|
145
|
-
* Skip the playing song if there is a next song in the queue.
|
|
146
|
-
* <info>If {@link Queue#autoplay} is `true` and there is no up next song,
|
|
147
|
-
* DisTube will add and play a related song.</info>
|
|
148
|
-
* @returns {Promise<Song>} The song will skip to
|
|
149
|
-
* @throws {Error}
|
|
150
|
-
*/
|
|
151
|
-
skip(): Promise<Song>;
|
|
152
|
-
/**
|
|
153
|
-
* Play the previous song if exists
|
|
154
|
-
* @returns {Song} The guild queue
|
|
155
|
-
* @throws {Error}
|
|
156
|
-
*/
|
|
157
|
-
previous(): Promise<Song>;
|
|
158
|
-
/**
|
|
159
|
-
* Shuffle the queue's songs
|
|
160
|
-
* @returns {Promise<Queue>} The guild queue
|
|
161
|
-
*/
|
|
162
|
-
shuffle(): Promise<Queue>;
|
|
163
|
-
/**
|
|
164
|
-
* Jump to the song position in the queue.
|
|
165
|
-
* The next one is 1, 2,...
|
|
166
|
-
* The previous one is -1, -2,...
|
|
167
|
-
* @param {number} position The song position to play
|
|
168
|
-
* @returns {Promise<Queue>} The guild queue
|
|
169
|
-
* @throws {Error} if `num` is invalid number
|
|
170
|
-
*/
|
|
171
|
-
jump(position: number): Promise<Queue>;
|
|
172
|
-
/**
|
|
173
|
-
* Set the repeat mode of the guild queue.\
|
|
174
|
-
* Toggle mode `(Disabled -> Song -> Queue -> Disabled ->...)` if `mode` is `undefined`
|
|
175
|
-
* @param {RepeatMode?} [mode] The repeat modes (toggle if `undefined`)
|
|
176
|
-
* @returns {RepeatMode} The new repeat mode
|
|
177
|
-
*/
|
|
178
|
-
setRepeatMode(mode?: RepeatMode): RepeatMode;
|
|
179
|
-
/**
|
|
180
|
-
* Enable or disable filter(s) of the queue.
|
|
181
|
-
* Available filters: {@link Filters}
|
|
182
|
-
* @param {string|string[]|false} filter A filter name, an array of filter name or `false` to clear all the filters
|
|
183
|
-
* @param {boolean} [force=false] Force enable the input filter(s) even if it's enabled
|
|
184
|
-
* @returns {Array<string>} Enabled filters.
|
|
185
|
-
* @throws {Error}
|
|
186
|
-
*/
|
|
187
|
-
setFilter(filter: string | string[] | false, force?: boolean): Array<string>;
|
|
188
|
-
/**
|
|
189
|
-
* Set the playing time to another position
|
|
190
|
-
* @param {number} time Time in seconds
|
|
191
|
-
* @returns {Queue} The guild queue
|
|
192
|
-
*/
|
|
193
|
-
seek(time: number): Queue;
|
|
194
|
-
/**
|
|
195
|
-
* Add a related song of the playing song to the queue
|
|
196
|
-
* @returns {Promise<Song>} The added song
|
|
197
|
-
* @throws {Error}
|
|
198
|
-
*/
|
|
199
|
-
addRelatedSong(): Promise<Song>;
|
|
200
|
-
/**
|
|
201
|
-
* Stop the guild stream and delete the queue
|
|
202
|
-
*/
|
|
203
|
-
stop(): Promise<void>;
|
|
204
|
-
/**
|
|
205
|
-
* Delete the queue from the manager
|
|
206
|
-
* (This does not leave the voice channel even if {@link DisTubeOptions|DisTubeOptions.leaveOnStop} is enabled)
|
|
207
|
-
* @private
|
|
208
|
-
*/
|
|
209
|
-
delete(): void;
|
|
210
|
-
/**
|
|
211
|
-
* Toggle autoplay mode
|
|
212
|
-
* @returns {boolean} Autoplay mode state
|
|
213
|
-
*/
|
|
214
|
-
toggleAutoplay(): boolean;
|
|
215
|
-
}
|
|
216
|
-
//# sourceMappingURL=Queue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Queue.d.ts","sourceRoot":"","sources":["../../src/struct/Queue.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAgB,UAAU,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,IAAI,CAAC;AAC/E,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEhF;;;GAGG;AACH,qBAAa,KAAM,SAAQ,WAAW;IACpC,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,IAAI,EAAE,CAAC;IACtB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,UAAU,EAAE,UAAU,CAAC;IACvB;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO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