Interface PermissionsProvider
- All Known Implementing Classes:
DefaultPermissionsProvider
public interface PermissionsProvider
Interface for performing permission checks.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasPermission
(@NotNull Member member, @NotNull InvocationContext<?> context) Checks if aMember
has permissions.boolean
hasPermission
(@NotNull User user, @NotNull InvocationContext<?> context) Checks if aUser
has permissions.
-
Method Details
-
hasPermission
Checks if aUser
has permissions. Compared tohasPermission(Member, InvocationContext)
this method will be called if the command gets executed in a non-guild context, where no member object is available.- Parameters:
user
- theUser
to perform the check againstcontext
- the correspondingInvocationContext
- Returns:
true
if the user has the permission to execute the command- See Also:
-
hasPermission
boolean hasPermission(@NotNull @NotNull Member member, @NotNull @NotNull InvocationContext<?> context) Checks if aMember
has permissions.- Parameters:
member
- theMember
to perform the check againstcontext
- the correspondingInvocationContext
- Returns:
true
if the user has the permission to execute the command
-