player-engine
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -34,3 +34,3 @@ /// <reference types="node" /> | ||
stop(unsubscribe?: boolean, forceStop?: boolean): boolean; | ||
play(interaction: Interaction | CommandInteraction, tracks?: PlayerTrack[]): Promise<void>; | ||
play(interaction: Interaction | CommandInteraction, tracks: PlayerTrack[]): Promise<void>; | ||
} |
@@ -222,13 +222,5 @@ "use strict"; | ||
}); | ||
let gotTracks = true; | ||
if (!tracks) { | ||
tracks = [this.tracks.current(), ...this.tracks.nextTracks()]; | ||
gotTracks = false; | ||
} | ||
if (gotTracks && !this.tracks.initialized) | ||
if (this.tracks.initialized) | ||
yield tracks.map((x) => __awaiter(this, void 0, void 0, function* () { return yield x.init(); })); | ||
if (gotTracks) { | ||
tracks.map(x => ('interaction' in x.metadata) ? x : x.addMetadata({ interaction, })); | ||
this.tracks.addTracks(tracks); | ||
} | ||
this.tracks.addTracks(tracks); | ||
if (!this.tracks.initialized) | ||
@@ -235,0 +227,0 @@ yield this.tracks.init(); |
{ | ||
"name": "player-engine", | ||
"description": "Play your Musics in Your Discord Music Bot | Discord.js V13 Only", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
42594
973