feat(music): implement Song Announce Feature

- Extend metadata property in ExtendedGuildQueuePlayerNode type to include lastMessage property.
- Enable music bot to announce the start of a new song by sending a message to the channel.
- Add new event, playerFinish, to fetch and delete the last song-announce message if possible.
- Modify play command to accommodate these changes.
This commit is contained in:
Aaron Sandoval committed 2024-01-15 00:57:46 -07:00
1 parent ce3de4ea2d
commit 99c3cd006f
5 files changed
+94 -15

No files matched your search

-8
View File
@@ -189,14 +189,6 @@ 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) {
message =
translator('musicPlayerCommon.nowPlayingTitle', {
icon: this.embedOptions.icons.audioStartedPlaying
}) +
'\n' +
trackUrl;
embedFooter = undefined;
}
const embed = new EmbedBuilder()