Package xyz.dynxsty.dih4jda.events
Class DIH4JDAEvent<I extends net.dv8tion.jda.api.interactions.Interaction>
java.lang.Object
xyz.dynxsty.dih4jda.events.DIH4JDAEvent<I>
- Type Parameters:
I- The follow-upInteraction
- Direct Known Subclasses:
CommandCooldownEvent,DIH4JDAThrowableEvent,InsufficientPermissionsEvent,InvalidGuildEvent,InvalidRoleEvent,InvalidUserEvent
public abstract class DIH4JDAEvent<I extends net.dv8tion.jda.api.interactions.Interaction>
extends Object
A generic event, which holds the events' name, the
DIH4JDA instance and the follow-up interaction.-
Method Summary
Modifier and TypeMethodDescriptionstatic <I extends net.dv8tion.jda.api.interactions.Interaction>
voidfire(DIH4JDAEvent<I> event) Fires an event from theDIH4JDAEventListener.TheDIH4JDAinstance that fired the event.The internal name of the event.The follow-up interaction that was defined by instantiating the class.
-
Method Details
-
fire
public static <I extends net.dv8tion.jda.api.interactions.Interaction> void fire(@Nonnull DIH4JDAEvent<I> event) Fires an event from theDIH4JDAEventListener.- Type Parameters:
I- The follow-upInteraction- Parameters:
event- TheDIH4JDAEventto fire.- Since:
- v1.5
-
getEventName
The internal name of the event.- Returns:
- The internal event name.
-
getDIH4JDA
TheDIH4JDAinstance that fired the event.- Returns:
- The
DIH4JDAinstance.
-
getInteraction
The follow-up interaction that was defined by instantiating the class.- Returns:
- The follow-up interaction of this event.
-