From 63fea747c651defc66d347571c592016e4182c8c Mon Sep 17 00:00:00 2001 From: Joshua Arulsamy Date: Sun, 9 Aug 2020 00:35:27 -0600 Subject: [PATCH] :bug: Fix np status autoremoval --- PlexBot/bot.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PlexBot/bot.py b/PlexBot/bot.py index 4d3258b..c71e64a 100644 --- a/PlexBot/bot.py +++ b/PlexBot/bot.py @@ -232,7 +232,12 @@ class Plex(commands.Cog): if self.current_track: embed, f = self._build_embed(self.current_track) bot_log.debug("Now playing") - await ctx.send(embed=embed, file=f) + if self.np_message_id: + await self.np_message_id.delete() + bot_log("Deleted old np status") + + bot_log("Created np status") + self.np_message_id = await ctx.send(embed=embed, file=f) @command() async def clear(self, ctx):