Skip to content

Commit

Permalink
Fix ignoring CommandsPlugin.guild when creating commands (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
abitofevrything authored Nov 23, 2023
1 parent 7520bd3 commit e243202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/commands.dart
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class CommandsPlugin extends NyxxPlugin<NyxxGateway> implements CommandGroup<Com
throw CommandsError('Cannot have more than one GuildCheck per command');
}

final guilds = guildChecks.singleOrNull?.guildIds ?? [null];
final guilds = guildChecks.singleOrNull?.guildIds ?? [guild];
for (final id in guilds) {
(result[id] ??= []).add(builder);
}
Expand Down

0 comments on commit e243202

Please sign in to comment.