Add behavior option to enable/disable player start messages

This commit is contained in:
Aaron Sandoval committed 2024-01-15 19:58:46 -07:00
1 parent 99c3cd006f
commit d91bf74991
5 files changed
+25 -3

No files matched your search

+10
View File
@@ -189,6 +189,16 @@ class PlayCommand extends BaseSlashCommandInteraction {
const posistionFirstTrackInPlaylist = queue.tracks.data.length - searchResult.tracks.length + 1;
embedFooter = this.getDisplayFooterTrackPosition(posistionFirstTrackInPlaylist, translator);
}
} else if (queue.currentTrack === track && queue.tracks.data.length === 0) {
if (!this.embedOptions.behavior.enablePlayerStartMessages) {
message =
translator('musicPlayerCommon.nowPlayingTitle', {
icon: this.embedOptions.icons.audioStartedPlaying
}) +
'\n' +
trackUrl;
embedFooter = undefined;
}
}
const embed = new EmbedBuilder()