Package xyz.dynxsty.dih4jda.events
Class InvalidRoleEvent
java.lang.Object
xyz.dynxsty.dih4jda.events.DIH4JDAEvent<net.dv8tion.jda.api.interactions.commands.CommandInteraction>
xyz.dynxsty.dih4jda.events.InvalidRoleEvent
public class InvalidRoleEvent
extends DIH4JDAEvent<net.dv8tion.jda.api.interactions.commands.CommandInteraction>
An event that gets fired when the user, which invoked the command, does NOT have the required roles to use this command.
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidRoleEvent(DIH4JDA dih4jda, net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<Long> roleIds) Create a new instance of theInvalidRoleEvent. -
Method Summary
Modifier and TypeMethodDescriptionThe ids of the roles that was allowed to execute theRestrictedCommand.Methods inherited from class xyz.dynxsty.dih4jda.events.DIH4JDAEvent
fire, getDIH4JDA, getEventName, getInteraction
-
Constructor Details
-
InvalidRoleEvent
public InvalidRoleEvent(@Nonnull DIH4JDA dih4jda, @Nonnull net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, @Nonnull Set<Long> roleIds) Create a new instance of theInvalidRoleEvent.- Parameters:
dih4jda- theDIH4JDAthat fired the event.interaction- theCommandInteraction.roleIds- the role ids that was allowed to execute theRestrictedCommand.
-
-
Method Details
-
getRoleIds
The ids of the roles that was allowed to execute theRestrictedCommand.- Returns:
- An immutable
Setof all "required" roles for the executed command. - See Also:
-