Package xyz.dynxsty.dih4jda.events
Class CommandCooldownEvent
java.lang.Object
xyz.dynxsty.dih4jda.events.DIH4JDAEvent<net.dv8tion.jda.api.interactions.commands.CommandInteraction>
xyz.dynxsty.dih4jda.events.CommandCooldownEvent
public class CommandCooldownEvent
extends DIH4JDAEvent<net.dv8tion.jda.api.interactions.commands.CommandInteraction>
An event that gets fired when the user, which invoked the command, is not yet able to use this command due to
a specified
Command Cooldown
Command Cooldowns DO NOT persist between sessions!-
Constructor Summary
ConstructorsConstructorDescriptionCommandCooldownEvent(DIH4JDA dih4jda, net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, RestrictedCommand.Cooldown cooldown) Creates a new instance of this event. -
Method Summary
Methods inherited from class xyz.dynxsty.dih4jda.events.DIH4JDAEvent
fire, getDIH4JDA, getEventName, getInteraction
-
Constructor Details
-
CommandCooldownEvent
public CommandCooldownEvent(@Nonnull DIH4JDA dih4jda, @Nonnull net.dv8tion.jda.api.interactions.commands.CommandInteraction interaction, @Nonnull RestrictedCommand.Cooldown cooldown) Creates a new instance of this event.- Parameters:
dih4jda- theDIH4JDAinstance that fired this event.interaction- theCommandInteraction.cooldown- theRestrictedCommand.Cooldownthe user has.
-
-
Method Details
-
getCooldown
Gets you theRestrictedCommand.Cooldownthe user has.- Returns:
- the
RestrictedCommand.Cooldowninstance.
-