Class PermissionsMiddleware

java.lang.Object
com.github.kaktushose.jda.commands.dispatching.middleware.impl.PermissionsMiddleware
All Implemented Interfaces:
Middleware, Consumer<InvocationContext<?>>

public class PermissionsMiddleware extends Object implements Middleware
A Middleware implementation that will check permissions. The default implementation can only handle discord permissions. However, the PermissionsProvider can be used for own implementations. This filter will first check against PermissionsProvider.hasPermission(User,InvocationContext) with a User object. This can be used for global permissions. Afterward PermissionsProvider.hasPermission(User,InvocationContext) will be called. Since the Member is available this might be used for guild related permissions.
See Also: