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
CommandConfig.enabledFor(). TheenabledForpermissions will be client-side checked by Discord directly, while thePermissionsannotation will be used for the own permission system of jda-commands. - Implementation Note:
The
PermissionsMiddlewarewill validate the permissions during the middleware phase of the execution chain. ThePermissionsProviderwill be called to check the respective user. The default implementation of thePermissionsProvidercan only handle Discord permissions(Permission).Example:
@Permissions("BAN_MEMBERS") public class BanCommand { ... }
-
Required Element Summary
Required Elements
-
Element Details
-
value
String[] valueReturns a String array of all required permissions.- Returns:
- a String array of all required permissions.
-