Class RestrictedCommand.Cooldown

java.lang.Object
xyz.dynxsty.dih4jda.interactions.commands.RestrictedCommand.Cooldown
Enclosing class:
RestrictedCommand

public static class RestrictedCommand.Cooldown extends Object
Model class which represents a single command cooldown.

Command Cooldowns DO NOT persist between sessions!

  • Method Details

    • getNextUse

      @Nonnull public Instant getNextUse()
      Gets you the Instant of when a user can use the RestrictedCommand the next time.
      Returns:
      The next time the command may be used again.
    • getLastUse

      @Nonnull public Instant getLastUse()
      Gets you the Instant the user has used the RestrictedCommand the last time.
      Returns:
      The last time the command was used.