magmastream 2.9.0-dev.27 → 2.9.0-dev.29
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/dist/index.d.ts +1622 -1245
- package/dist/index.js +8 -0
- package/dist/structures/Enums.js +200 -0
- package/dist/structures/Manager.js +92 -175
- package/dist/structures/Node.js +64 -80
- package/dist/structures/Player.js +74 -107
- package/dist/structures/Queue.js +24 -24
- package/dist/structures/RedisQueue.js +21 -21
- package/dist/structures/Rest.js +6 -6
- package/dist/structures/Types.js +3 -0
- package/dist/structures/Utils.js +152 -138
- package/dist/utils/managerCheck.js +8 -8
- package/dist/wrappers/detritus.js +36 -0
- package/dist/wrappers/discord.js.js +29 -0
- package/dist/wrappers/eris.js +29 -0
- package/dist/wrappers/oceanic.js +29 -0
- package/package.json +7 -3
package/dist/index.js
CHANGED
|
@@ -9,3 +9,11 @@ tslib_1.__exportStar(require("./structures/Plugin"), exports);
|
|
|
9
9
|
tslib_1.__exportStar(require("./structures/Queue"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./structures/Rest"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./structures/Utils"), exports);
|
|
12
|
+
// wrappers
|
|
13
|
+
tslib_1.__exportStar(require("./wrappers/discord.js"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./wrappers/eris"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./wrappers/detritus"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./wrappers/oceanic"), exports);
|
|
17
|
+
// types
|
|
18
|
+
tslib_1.__exportStar(require("./structures/Types"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./structures/Enums"), exports);
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SponsorBlockSegment = exports.SeverityTypes = exports.TrackEndReasonTypes = exports.ManagerEventTypes = exports.TrackPartial = exports.UseNodeOptions = exports.TrackSourceTypes = exports.PlayerStateEventTypes = exports.SearchPlatform = exports.LoadTypes = exports.StateTypes = exports.AutoPlayPlatform = exports.StateStorageType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* State Storage Enum
|
|
6
|
+
*/
|
|
7
|
+
var StateStorageType;
|
|
8
|
+
(function (StateStorageType) {
|
|
9
|
+
StateStorageType["Collection"] = "collection";
|
|
10
|
+
StateStorageType["Redis"] = "redis";
|
|
11
|
+
})(StateStorageType || (exports.StateStorageType = StateStorageType = {}));
|
|
12
|
+
/**
|
|
13
|
+
* AutoPlay Platform Enum
|
|
14
|
+
*/
|
|
15
|
+
var AutoPlayPlatform;
|
|
16
|
+
(function (AutoPlayPlatform) {
|
|
17
|
+
AutoPlayPlatform["Spotify"] = "spotify";
|
|
18
|
+
AutoPlayPlatform["Deezer"] = "deezer";
|
|
19
|
+
AutoPlayPlatform["SoundCloud"] = "soundcloud";
|
|
20
|
+
AutoPlayPlatform["Tidal"] = "tidal";
|
|
21
|
+
AutoPlayPlatform["VKMusic"] = "vkmusic";
|
|
22
|
+
AutoPlayPlatform["Qobuz"] = "qobuz";
|
|
23
|
+
AutoPlayPlatform["YouTube"] = "youtube";
|
|
24
|
+
})(AutoPlayPlatform || (exports.AutoPlayPlatform = AutoPlayPlatform = {}));
|
|
25
|
+
/**
|
|
26
|
+
* State Types Enum
|
|
27
|
+
*/
|
|
28
|
+
var StateTypes;
|
|
29
|
+
(function (StateTypes) {
|
|
30
|
+
StateTypes["Connected"] = "CONNECTED";
|
|
31
|
+
StateTypes["Connecting"] = "CONNECTING";
|
|
32
|
+
StateTypes["Disconnected"] = "DISCONNECTED";
|
|
33
|
+
StateTypes["Disconnecting"] = "DISCONNECTING";
|
|
34
|
+
StateTypes["Destroying"] = "DESTROYING";
|
|
35
|
+
})(StateTypes || (exports.StateTypes = StateTypes = {}));
|
|
36
|
+
/**
|
|
37
|
+
* Load Types Enum
|
|
38
|
+
*/
|
|
39
|
+
var LoadTypes;
|
|
40
|
+
(function (LoadTypes) {
|
|
41
|
+
LoadTypes["Track"] = "track";
|
|
42
|
+
LoadTypes["Playlist"] = "playlist";
|
|
43
|
+
LoadTypes["Search"] = "search";
|
|
44
|
+
LoadTypes["Empty"] = "empty";
|
|
45
|
+
LoadTypes["Error"] = "error";
|
|
46
|
+
})(LoadTypes || (exports.LoadTypes = LoadTypes = {}));
|
|
47
|
+
/**
|
|
48
|
+
* Search Platform Enum
|
|
49
|
+
*/
|
|
50
|
+
var SearchPlatform;
|
|
51
|
+
(function (SearchPlatform) {
|
|
52
|
+
SearchPlatform["AppleMusic"] = "amsearch";
|
|
53
|
+
SearchPlatform["Bandcamp"] = "bcsearch";
|
|
54
|
+
SearchPlatform["Deezer"] = "dzsearch";
|
|
55
|
+
SearchPlatform["Jiosaavn"] = "jssearch";
|
|
56
|
+
SearchPlatform["Qobuz"] = "qbsearch";
|
|
57
|
+
SearchPlatform["SoundCloud"] = "scsearch";
|
|
58
|
+
SearchPlatform["Spotify"] = "spsearch";
|
|
59
|
+
SearchPlatform["Tidal"] = "tdsearch";
|
|
60
|
+
SearchPlatform["VKMusic"] = "vksearch";
|
|
61
|
+
SearchPlatform["YouTube"] = "ytsearch";
|
|
62
|
+
SearchPlatform["YouTubeMusic"] = "ytmsearch";
|
|
63
|
+
})(SearchPlatform || (exports.SearchPlatform = SearchPlatform = {}));
|
|
64
|
+
/**
|
|
65
|
+
* Player State Event Types Enum
|
|
66
|
+
*/
|
|
67
|
+
var PlayerStateEventTypes;
|
|
68
|
+
(function (PlayerStateEventTypes) {
|
|
69
|
+
PlayerStateEventTypes["AutoPlayChange"] = "playerAutoplay";
|
|
70
|
+
PlayerStateEventTypes["ConnectionChange"] = "playerConnection";
|
|
71
|
+
PlayerStateEventTypes["RepeatChange"] = "playerRepeat";
|
|
72
|
+
PlayerStateEventTypes["PauseChange"] = "playerPause";
|
|
73
|
+
PlayerStateEventTypes["QueueChange"] = "queueChange";
|
|
74
|
+
PlayerStateEventTypes["TrackChange"] = "trackChange";
|
|
75
|
+
PlayerStateEventTypes["VolumeChange"] = "volumeChange";
|
|
76
|
+
PlayerStateEventTypes["ChannelChange"] = "channelChange";
|
|
77
|
+
PlayerStateEventTypes["PlayerCreate"] = "playerCreate";
|
|
78
|
+
PlayerStateEventTypes["PlayerDestroy"] = "playerDestroy";
|
|
79
|
+
})(PlayerStateEventTypes || (exports.PlayerStateEventTypes = PlayerStateEventTypes = {}));
|
|
80
|
+
/**
|
|
81
|
+
* Track Source Types Enum
|
|
82
|
+
*/
|
|
83
|
+
var TrackSourceTypes;
|
|
84
|
+
(function (TrackSourceTypes) {
|
|
85
|
+
TrackSourceTypes["AppleMusic"] = "applemusic";
|
|
86
|
+
TrackSourceTypes["Bandcamp"] = "bandcamp";
|
|
87
|
+
TrackSourceTypes["Deezer"] = "deezer";
|
|
88
|
+
TrackSourceTypes["Jiosaavn"] = "jiosaavn";
|
|
89
|
+
TrackSourceTypes["SoundCloud"] = "soundcloud";
|
|
90
|
+
TrackSourceTypes["Spotify"] = "spotify";
|
|
91
|
+
TrackSourceTypes["Tidal"] = "tidal";
|
|
92
|
+
TrackSourceTypes["VKMusic"] = "vkmusic";
|
|
93
|
+
TrackSourceTypes["YouTube"] = "youtube";
|
|
94
|
+
})(TrackSourceTypes || (exports.TrackSourceTypes = TrackSourceTypes = {}));
|
|
95
|
+
/**
|
|
96
|
+
* Use Node Options Enum
|
|
97
|
+
*/
|
|
98
|
+
var UseNodeOptions;
|
|
99
|
+
(function (UseNodeOptions) {
|
|
100
|
+
UseNodeOptions["LeastLoad"] = "leastLoad";
|
|
101
|
+
UseNodeOptions["LeastPlayers"] = "leastPlayers";
|
|
102
|
+
})(UseNodeOptions || (exports.UseNodeOptions = UseNodeOptions = {}));
|
|
103
|
+
/**
|
|
104
|
+
* Track Partial Enum
|
|
105
|
+
*/
|
|
106
|
+
var TrackPartial;
|
|
107
|
+
(function (TrackPartial) {
|
|
108
|
+
/** The base64 encoded string of the track */
|
|
109
|
+
TrackPartial["Track"] = "track";
|
|
110
|
+
/** The title of the track */
|
|
111
|
+
TrackPartial["Title"] = "title";
|
|
112
|
+
/** The track identifier */
|
|
113
|
+
TrackPartial["Identifier"] = "identifier";
|
|
114
|
+
/** The author of the track */
|
|
115
|
+
TrackPartial["Author"] = "author";
|
|
116
|
+
/** The length of the track in milliseconds */
|
|
117
|
+
TrackPartial["Duration"] = "duration";
|
|
118
|
+
/** The ISRC of the track */
|
|
119
|
+
TrackPartial["Isrc"] = "isrc";
|
|
120
|
+
/** Whether the track is seekable */
|
|
121
|
+
TrackPartial["IsSeekable"] = "isSeekable";
|
|
122
|
+
/** Whether the track is a stream */
|
|
123
|
+
TrackPartial["IsStream"] = "isStream";
|
|
124
|
+
/** The URI of the track */
|
|
125
|
+
TrackPartial["Uri"] = "uri";
|
|
126
|
+
/** The artwork URL of the track */
|
|
127
|
+
TrackPartial["ArtworkUrl"] = "artworkUrl";
|
|
128
|
+
/** The source name of the track */
|
|
129
|
+
TrackPartial["SourceName"] = "sourceName";
|
|
130
|
+
/** The thumbnail of the track */
|
|
131
|
+
TrackPartial["ThumbNail"] = "thumbnail";
|
|
132
|
+
/** The requester of the track */
|
|
133
|
+
TrackPartial["Requester"] = "requester";
|
|
134
|
+
/** The plugin info of the track */
|
|
135
|
+
TrackPartial["PluginInfo"] = "pluginInfo";
|
|
136
|
+
/** The custom data of the track */
|
|
137
|
+
TrackPartial["CustomData"] = "customData";
|
|
138
|
+
})(TrackPartial || (exports.TrackPartial = TrackPartial = {}));
|
|
139
|
+
var ManagerEventTypes;
|
|
140
|
+
(function (ManagerEventTypes) {
|
|
141
|
+
ManagerEventTypes["ChapterStarted"] = "chapterStarted";
|
|
142
|
+
ManagerEventTypes["ChaptersLoaded"] = "chaptersLoaded";
|
|
143
|
+
ManagerEventTypes["Debug"] = "debug";
|
|
144
|
+
ManagerEventTypes["NodeConnect"] = "nodeConnect";
|
|
145
|
+
ManagerEventTypes["NodeCreate"] = "nodeCreate";
|
|
146
|
+
ManagerEventTypes["NodeDestroy"] = "nodeDestroy";
|
|
147
|
+
ManagerEventTypes["NodeDisconnect"] = "nodeDisconnect";
|
|
148
|
+
ManagerEventTypes["NodeError"] = "nodeError";
|
|
149
|
+
ManagerEventTypes["NodeRaw"] = "nodeRaw";
|
|
150
|
+
ManagerEventTypes["NodeReconnect"] = "nodeReconnect";
|
|
151
|
+
ManagerEventTypes["PlayerCreate"] = "playerCreate";
|
|
152
|
+
ManagerEventTypes["PlayerDestroy"] = "playerDestroy";
|
|
153
|
+
ManagerEventTypes["PlayerDisconnect"] = "playerDisconnect";
|
|
154
|
+
ManagerEventTypes["PlayerMove"] = "playerMove";
|
|
155
|
+
ManagerEventTypes["PlayerRestored"] = "playerRestored";
|
|
156
|
+
ManagerEventTypes["PlayerStateUpdate"] = "playerStateUpdate";
|
|
157
|
+
ManagerEventTypes["QueueEnd"] = "queueEnd";
|
|
158
|
+
ManagerEventTypes["RestoreComplete"] = "restoreComplete";
|
|
159
|
+
ManagerEventTypes["SegmentSkipped"] = "segmentSkipped";
|
|
160
|
+
ManagerEventTypes["SegmentsLoaded"] = "segmentsLoaded";
|
|
161
|
+
ManagerEventTypes["SocketClosed"] = "socketClosed";
|
|
162
|
+
ManagerEventTypes["TrackEnd"] = "trackEnd";
|
|
163
|
+
ManagerEventTypes["TrackError"] = "trackError";
|
|
164
|
+
ManagerEventTypes["TrackStart"] = "trackStart";
|
|
165
|
+
ManagerEventTypes["TrackStuck"] = "trackStuck";
|
|
166
|
+
})(ManagerEventTypes || (exports.ManagerEventTypes = ManagerEventTypes = {}));
|
|
167
|
+
/**
|
|
168
|
+
* Track End Reason Enum
|
|
169
|
+
*/
|
|
170
|
+
var TrackEndReasonTypes;
|
|
171
|
+
(function (TrackEndReasonTypes) {
|
|
172
|
+
TrackEndReasonTypes["Finished"] = "finished";
|
|
173
|
+
TrackEndReasonTypes["LoadFailed"] = "loadFailed";
|
|
174
|
+
TrackEndReasonTypes["Stopped"] = "stopped";
|
|
175
|
+
TrackEndReasonTypes["Replaced"] = "replaced";
|
|
176
|
+
TrackEndReasonTypes["Cleanup"] = "cleanup";
|
|
177
|
+
})(TrackEndReasonTypes || (exports.TrackEndReasonTypes = TrackEndReasonTypes = {}));
|
|
178
|
+
/**
|
|
179
|
+
* Severity Types Enum
|
|
180
|
+
*/
|
|
181
|
+
var SeverityTypes;
|
|
182
|
+
(function (SeverityTypes) {
|
|
183
|
+
SeverityTypes["Common"] = "common";
|
|
184
|
+
SeverityTypes["Suspicious"] = "suspicious";
|
|
185
|
+
SeverityTypes["Fault"] = "fault";
|
|
186
|
+
})(SeverityTypes || (exports.SeverityTypes = SeverityTypes = {}));
|
|
187
|
+
/**
|
|
188
|
+
* SponsorBlock Segment Enum
|
|
189
|
+
*/
|
|
190
|
+
var SponsorBlockSegment;
|
|
191
|
+
(function (SponsorBlockSegment) {
|
|
192
|
+
SponsorBlockSegment["Sponsor"] = "sponsor";
|
|
193
|
+
SponsorBlockSegment["SelfPromo"] = "selfpromo";
|
|
194
|
+
SponsorBlockSegment["Interaction"] = "interaction";
|
|
195
|
+
SponsorBlockSegment["Intro"] = "intro";
|
|
196
|
+
SponsorBlockSegment["Outro"] = "outro";
|
|
197
|
+
SponsorBlockSegment["Preview"] = "preview";
|
|
198
|
+
SponsorBlockSegment["MusicOfftopic"] = "music_offtopic";
|
|
199
|
+
SponsorBlockSegment["Filler"] = "filler";
|
|
200
|
+
})(SponsorBlockSegment || (exports.SponsorBlockSegment = SponsorBlockSegment = {}));
|