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