Package xyz.dynxsty.dih4jda.events
Interface DIH4JDAEventListener
public interface DIH4JDAEventListener
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonAutoCompleteException(net.dv8tion.jda.api.interactions.commands.CommandAutoCompleteInteraction interaction, Exception e) An Event that gets fired when an exception gets raised while handling an AutoComplete interaction.default voidonCommandException(net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Exception e) An Event that gets fired when an exception gets raised while executing any Command.default voidonComponentException(net.dv8tion.jda.api.interactions.components.ComponentInteraction interaction, Exception e) An Event that gets fired when an exception gets raised while interacting with a message component.default voidonInsufficientPermissions(net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<net.dv8tion.jda.api.Permission> permissions) An Event that gets fired when the user, which invoked the command, does NOT have one of the required Permissions.default voidonInvalidRole(net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<Long> roleIds) An Event that gets fired when the user, which invoked the command, does NOT have the required roles to use this command.default voidonInvalidUser(net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<Long> userIds) An Event that gets fired when the user, which invoked the command, is NOT allowed to use this command.default voidonModalException(net.dv8tion.jda.api.interactions.modals.ModalInteraction interaction, Exception e) An Event that gets fired when an exception gets raised while handling a Modal interaction.
-
Method Details
-
onCommandException
default void onCommandException(net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Exception e) An Event that gets fired when an exception gets raised while executing any Command.- Parameters:
interaction- TheCommandInteraction.e- The Exception that was raised.- See Also:
-
onComponentException
default void onComponentException(net.dv8tion.jda.api.interactions.components.ComponentInteraction interaction, Exception e) An Event that gets fired when an exception gets raised while interacting with a message component.- Parameters:
interaction- TheComponentInteraction.e- The Exception that was raised.
-
onAutoCompleteException
default void onAutoCompleteException(net.dv8tion.jda.api.interactions.commands.CommandAutoCompleteInteraction interaction, Exception e) An Event that gets fired when an exception gets raised while handling an AutoComplete interaction.- Parameters:
interaction- TheCommandAutoCompleteInteraction.e- The Exception that was raised.- See Also:
-
onModalException
default void onModalException(net.dv8tion.jda.api.interactions.modals.ModalInteraction interaction, Exception e) An Event that gets fired when an exception gets raised while handling a Modal interaction.- Parameters:
interaction- TheModalInteraction.e- The Exception that was raised.
-
onInsufficientPermissions
default void onInsufficientPermissions(net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<net.dv8tion.jda.api.Permission> permissions) An Event that gets fired when the user, which invoked the command, does NOT have one of the required Permissions.- Parameters:
interaction- TheCommandInteraction.permissions- TheSetofPermissions which are required to run this commands.- See Also:
-
onInvalidUser
default void onInvalidUser(net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<Long> userIds) An Event that gets fired when the user, which invoked the command, is NOT allowed to use this command. -
onInvalidRole
default void onInvalidRole(net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, Set<Long> roleIds) An Event that gets fired when the user, which invoked the command, does NOT have the required roles to use this command.
-