Skip to content

Commit

Permalink
Filter voice state updates to only trigger on the bot's own state upd…
Browse files Browse the repository at this point in the history
…ated
  • Loading branch information
abitofevrything committed Dec 3, 2023
1 parent 2f082c8 commit 2e90e1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/nyxx_lavalink/lib/src/plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class _LavalinkPluginState extends NyxxPluginState<NyxxGateway, LavalinkPlugin>
});

client.onVoiceStateUpdate.listen((event) async {
if (event.state.userId != client.user.id) return;

final guildId = event.state.guildId;
if (guildId == null) return;

Expand Down

0 comments on commit 2e90e1e

Please sign in to comment.