Skip to content

Commit

Permalink
Implement permissions v2 (#56)
Browse files Browse the repository at this point in the history
* Bump nyxx_interactions to 4.2.0

* Deprecated AbstractCheck.permissions

* Remove unneeded overrides of deprecated members

* Migrate existing checks to permissions v2

* Migrate command registration to permissions v2

* Update documentation

* Better organise the checks file structure

* Add PermissionsCheck

* Fix typo

* Release 4.2.0-dev.0
  • Loading branch information
abitofevrything authored May 1, 2022
1 parent a878331 commit 9d9ade7
Show file tree
Hide file tree
Showing 10 changed files with 510 additions and 289 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 4.2.0-dev.0
__Deprecations__:
- Deprecated `AbstractCheck.permissions` and all associated features.

__New features__:
- Added `AbtractCheck.allowsDm` and `AbstractCheck.requiredPermissions` for integrating checks with permissions v2.
- Updated `Check.deny`, `Check.any` and `Check.all` to work with permissions v2.
- Added `PermissionsCheck`, for checking if users have a specific permission.

__Miscellaneous__:
- Bump `nyxx_interactions` to 4.2.0.
- Added proper names to context type checks if none is provided.

## 4.1.2
__Bug fixes__:
- Fixes an issue where slash commands nested within text-only commands would not be registered
Expand Down
5 changes: 4 additions & 1 deletion lib/nyxx_commands.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// A framework for easily creating slash commands and text commands for Discord using the nyxx library.
library nyxx_commands;

export 'src/checks/checks.dart' show AbstractCheck, Check, GuildCheck, RoleCheck, UserCheck;
export 'src/checks/checks.dart' show AbstractCheck, Check;
export 'src/checks/context_type.dart'
show
ChatCommandCheck,
Expand All @@ -11,6 +11,9 @@ export 'src/checks/context_type.dart'
MessageCommandCheck,
UserCommandCheck;
export 'src/checks/cooldown.dart' show CooldownCheck, CooldownType;
export 'src/checks/guild.dart' show GuildCheck;
export 'src/checks/permissions.dart' show PermissionsCheck;
export 'src/checks/user.dart' show RoleCheck, UserCheck;
export 'src/commands.dart' show CommandsPlugin;
export 'src/commands/chat_command.dart' show ChatCommand, ChatGroup, CommandType;
export 'src/commands/interfaces.dart'
Expand Down
Loading

0 comments on commit 9d9ade7

Please sign in to comment.