Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/appujet/lavamusic
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasB25 committed Oct 24, 2024
2 parents e9365a9 + 827207c commit 93df240
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/music/PlayNext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class PlayNext extends Command {
],
});
}
if (!player.playing) await player.play({ paused: false });
if (!player.playing && player.queue.tracks.length > 0) await player.play({ paused: false });
}
public async autocomplete(interaction: AutocompleteInteraction): Promise<void> {
const focusedValue = interaction.options.getFocused();
Expand Down
2 changes: 1 addition & 1 deletion src/commands/music/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default class Search extends Command {
await int.deferUpdate();
if (!track) return;
player.queue.add(track);
if (!player.playing) await player.play({ paused: false });
if (!player.playing && player.queue.tracks.length > 0) await player.play({ paused: false });
await ctx.editMessage({
embeds: [
embed.setDescription(
Expand Down
2 changes: 1 addition & 1 deletion src/commands/playlist/Load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default class LoadPlaylist extends Command {
}
player.queue.add(tracks);

if (!player.playing) await player.play({ paused: false });
if (!player.playing && player.queue.tracks.length > 0) await player.play({ paused: false });

return await ctx.sendMessage({
embeds: [
Expand Down
2 changes: 1 addition & 1 deletion src/utils/SetupSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async function setupStart(client: Lavamusic, query: string, player: Player, mess
break;
}
}
if (!player.playing) await player.play();
if (!player.playing && player.queue.tracks.length > 0) await player.play();
}
} catch (error) {
client.logger.error(error);
Expand Down

0 comments on commit 93df240

Please sign in to comment.