Annotation Interface Permissions
Interaction
classes or
interaction methods (commands, components or modals) annotated with Permission will
require the user to have the given permissions in order to execute the command.- See Also:
- API Note:
- This annotation should not be confused with
SlashCommand.enabledFor()
orContextCommand.enabledFor()
. TheenabledFor
permissions will be client-side checked by Discord directly, while thePermissions
annotation will be used for the own permission system of jda-commands. - Implementation Note:
The
PermissionsMiddleware
will validate the permissions during the middleware phase of the execution chain. ThePermissionsProvider
will be called to check the respective user. The default implementation of thePermissionsProvider
can only handle Discord permissions(Permission
).Example:
@Permissions("BAN_MEMBERS") public class BanCommand { ... }
-
Required Element Summary
-
Element Details
-
value
String[] valueReturns a String array of all required permissions.- Returns:
- a String array of all required permissions.
-