Package xyz.dynxsty.dih4jda.events
Class InvalidGuildEvent
java.lang.Object
xyz.dynxsty.dih4jda.events.DIH4JDAEvent<net.dv8tion.jda.api.interactions.commands.CommandInteraction>
xyz.dynxsty.dih4jda.events.InvalidGuildEvent
public class InvalidGuildEvent
extends DIH4JDAEvent<net.dv8tion.jda.api.interactions.commands.CommandInteraction>
An event that gets fired when the command is NOT executed in one of the required guild.
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidGuildEvent(DIH4JDA dih4jda, net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<Long> guildIds) Creates a new instanceInvalidGuildEvent. -
Method Summary
Modifier and TypeMethodDescriptionThe guild ids that the commands could only be executed on.Methods inherited from class xyz.dynxsty.dih4jda.events.DIH4JDAEvent
fire, getDIH4JDA, getEventName, getInteraction
-
Constructor Details
-
InvalidGuildEvent
public InvalidGuildEvent(@Nonnull DIH4JDA dih4jda, @Nonnull net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, @Nonnull Set<Long> guildIds) Creates a new instanceInvalidGuildEvent.- Parameters:
dih4jda- theDIH4JDAinstance that fired this event.interaction- theCommandInteraction.guildIds- the guild ids that theRestrictedCommandcould be executed on.
-
-
Method Details
-
getGuildIds
The guild ids that the commands could only be executed on.- Returns:
- An immutable
Setof all "required" guilds for the executed command. - See Also:
-