Skip to content

Commit

Permalink
fix(lava/cogs/commands.py, lava/cogs/events.py): remove redundant eve…
Browse files Browse the repository at this point in the history
…nt dispatch calls
  • Loading branch information
Nat1anWasTaken committed May 12, 2024
1 parent 9c10a77 commit 7a198fd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions lava/cogs/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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, "已繼續歌曲"))
)
Expand Down
1 change: 0 additions & 1 deletion lava/cogs/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7a198fd

Please sign in to comment.