Interface DIH4JDAEventListener


public interface DIH4JDAEventListener
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.
    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.
    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.
    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.
    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.
  • 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 - The CommandInteraction.
      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 - The ComponentInteraction.
      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 - The CommandAutoCompleteInteraction.
      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 - The ModalInteraction.
      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 - The CommandInteraction.
      permissions - The Set of Permissions 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.
      Parameters:
      interaction - The CommandInteraction.
      userIds - The Set of Longs (user Ids) which are able to use this command.
      See Also:
    • 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.
      Parameters:
      interaction - The CommandInteraction.
      roleIds - The Set of Longs (role Ids) which are able to use this command.
      See Also: