Skip to content

Commit

Permalink
BlancoBot: Send Now Playing message silently
Browse files Browse the repository at this point in the history
  • Loading branch information
jareddantis committed Oct 8, 2023
1 parent 8c0095a commit 59a9188
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions utils/blanco.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 59a9188

Please sign in to comment.