From 7a198fdf6ac1b8edb79f45cb007d1cf9cbdd31e4 Mon Sep 17 00:00:00 2001 From: Nat1anWasTaken Date: Sun, 12 May 2024 22:54:59 +0800 Subject: [PATCH] fix(lava/cogs/commands.py, lava/cogs/events.py): remove redundant event dispatch calls --- lava/cogs/commands.py | 4 ---- lava/cogs/events.py | 1 - 2 files changed, 5 deletions(-) diff --git a/lava/cogs/commands.py b/lava/cogs/commands.py index 81bdcac6..7f5438d6 100644 --- a/lava/cogs/commands.py +++ b/lava/cogs/commands.py @@ -233,8 +233,6 @@ async def play(self, interaction: ApplicationCommandInteraction, query: str, ind if not player.is_playing: await player.play() - self.bot.dispatch("play_or_resume", player=player) - await player.update_display(await interaction.original_response(), delay=5, locale=interaction.locale) @commands.slash_command( @@ -396,8 +394,6 @@ async def resume(self, interaction: ApplicationCommandInteraction): await player.set_pause(False) - self.bot.dispatch("play_or_resume", player=player) - await interaction.edit_original_response( embed=SuccessEmbed(self.bot.get_text("command.resume.success", interaction.locale, "已繼續歌曲")) ) diff --git a/lava/cogs/events.py b/lava/cogs/events.py index 485192bc..4e90f6d1 100644 --- a/lava/cogs/events.py +++ b/lava/cogs/events.py @@ -136,7 +136,6 @@ async def on_message_interaction(self, interaction: MessageInteraction): match interaction.data.custom_id: case "control.resume": await player.set_pause(False) - self.bot.dispatch("play_or_resume", player=player) case "control.pause": await player.set_pause(True)