Skip to content

Commit

Permalink
Don't handle messages if no prefix is set (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
abitofevrything authored Sep 24, 2023
1 parent e3234a1 commit 3f9c4a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/src/event_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ class EventManager {
///
/// Attach to [NyxxGateway.onMessageCreate].
Future<void> processMessageCreateEvent(MessageCreateEvent event) async {
if (commands.prefix == null) return;

final message = event.message;

Pattern prefix = await commands.prefix!(event);
Expand Down

0 comments on commit 3f9c4a2

Please sign in to comment.