From 59a9188cbbe61ac211364567721e71b510305cce Mon Sep 17 00:00:00 2001 From: Jared Dantis Date: Sun, 8 Oct 2023 22:53:20 +0800 Subject: [PATCH] BlancoBot: Send Now Playing message silently --- utils/blanco.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utils/blanco.py b/utils/blanco.py index 87b17d2..34786ca 100644 --- a/utils/blanco.py +++ b/utils/blanco.py @@ -9,7 +9,7 @@ from mafic import EndReason, NodePool, VoiceRegion from nextcord import (Activity, ActivityType, Forbidden, HTTPException, Interaction, NotFound, PartialMessageable, StageChannel, - TextChannel, Thread, VoiceChannel) + TextChannel, Thread, VoiceChannel, MessageFlags) from nextcord.ext.commands import Bot from cogs.player.jockey_helpers import find_lavalink_track @@ -488,7 +488,11 @@ async def send_now_playing(self, event: 'TrackStartEvent[Jockey]'): current_track = event.player.queue_manager.current embed = event.player.now_playing(event.track) view = NowPlayingView(self, event.player, current_track.spotify_id) - msg = await channel.send(embed=embed, view=view) + + # Send message silently + flags = MessageFlags() + flags.suppress_notifications = True + msg = await channel.send(embed=embed, view=view, flags=flags) # Save now playing message ID self.database.set_now_playing(guild_id, msg.id)