diff --git a/src/commands/music/PlayNext.ts b/src/commands/music/PlayNext.ts index a0b167532..40849ac9e 100644 --- a/src/commands/music/PlayNext.ts +++ b/src/commands/music/PlayNext.ts @@ -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 { const focusedValue = interaction.options.getFocused(); diff --git a/src/commands/music/Search.ts b/src/commands/music/Search.ts index 3735bbde7..871c57b69 100644 --- a/src/commands/music/Search.ts +++ b/src/commands/music/Search.ts @@ -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( diff --git a/src/commands/playlist/Load.ts b/src/commands/playlist/Load.ts index 9f6ca3689..f031853d7 100644 --- a/src/commands/playlist/Load.ts +++ b/src/commands/playlist/Load.ts @@ -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: [ diff --git a/src/utils/SetupSystem.ts b/src/utils/SetupSystem.ts index a0b1d45c3..9ac11fde7 100644 --- a/src/utils/SetupSystem.ts +++ b/src/utils/SetupSystem.ts @@ -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);