Package xyz.dynxsty.dih4jda.events
Class InsufficientPermissionsEvent
java.lang.Object
xyz.dynxsty.dih4jda.events.DIH4JDAEvent<net.dv8tion.jda.api.interactions.commands.CommandInteraction>
xyz.dynxsty.dih4jda.events.InsufficientPermissionsEvent
public class InsufficientPermissionsEvent
extends DIH4JDAEvent<net.dv8tion.jda.api.interactions.commands.CommandInteraction>
An event that gets fired when the user, which invoked the command, does NOT have one of the required permissions.
-
Constructor Summary
ConstructorsConstructorDescriptionInsufficientPermissionsEvent(DIH4JDA dih4jda, net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<net.dv8tion.jda.api.Permission> permissions) Creates an instance of theInsufficientPermissionsEvent. -
Method Summary
Modifier and TypeMethodDescriptionSet<net.dv8tion.jda.api.Permission>Gets you all the permissions that are required to perform theRestrictedCommandthat causes this event.Methods inherited from class xyz.dynxsty.dih4jda.events.DIH4JDAEvent
fire, getDIH4JDA, getEventName, getInteraction
-
Constructor Details
-
InsufficientPermissionsEvent
public InsufficientPermissionsEvent(@Nonnull DIH4JDA dih4jda, @Nonnull net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, @Nonnull Set<net.dv8tion.jda.api.Permission> permissions) Creates an instance of theInsufficientPermissionsEvent.- Parameters:
dih4jda- theDIH4JDAthat fired this event.interaction- theCommandInteraction.permissions- thePermissionthat was required.
-
-
Method Details
-
getPermissions
Gets you all the permissions that are required to perform theRestrictedCommandthat causes this event.- Returns:
- An immutable
Setof all "required" permissions for the executed command. - See Also:
-