Class Interaction

java.lang.Object
tech.xigam.cch.utils.Interaction

public final class Interaction extends Object
  • Constructor Details

    • Interaction

      public Interaction(ComplexCommandHandler commandHandler, net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent event, BaseCommand command)
    • Interaction

      public Interaction(ComplexCommandHandler commandHandler, net.dv8tion.jda.api.entities.Message message, net.dv8tion.jda.api.entities.MessageChannel channel, List<String> arguments, BaseCommand command)
  • Method Details

    • getCommandHandler

      public ComplexCommandHandler getCommandHandler()
    • getArguments

      @Deprecated(since="1.6.0") public Map<String,Object> getArguments()
      Deprecated.
    • getRawArguments

      @Deprecated(since="1.6.0") public List<String> getRawArguments()
      Deprecated.
    • getArgument

      public <T> T getArgument(String reference, Class<T> type)
    • getArgument

      public <T> T getArgument(String reference, T fallback, Class<T> type)
    • getSlashExecutor

      @Nullable public net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent getSlashExecutor()
    • isSlash

      public boolean isSlash()
    • isDeferred

      public boolean isDeferred()
    • isEphemeral

      public boolean isEphemeral()
    • isFromGuild

      public boolean isFromGuild()
    • deferReply

      public void deferReply()
    • setEphemeral

      public Interaction setEphemeral()
    • setEphemeral

      public Interaction setEphemeral(boolean sendToDMs)
    • addButtons

      public Interaction addButtons(net.dv8tion.jda.api.interactions.components.buttons.Button... buttons)
    • addSelectMenu

      public Interaction addSelectMenu(net.dv8tion.jda.api.interactions.components.selections.SelectMenu menu)
    • sendMessage

      public Interaction sendMessage(String message)
    • sendMessage

      public Interaction sendMessage(net.dv8tion.jda.api.entities.MessageEmbed message)
    • reply

      public void reply(String message)
    • reply

      public void reply(net.dv8tion.jda.api.entities.MessageEmbed embed)
    • reply

      public void reply(String message, boolean mentionUser)
    • reply

      public void reply(net.dv8tion.jda.api.entities.MessageEmbed message, boolean mentionUser)
    • execute

      public void execute(Consumer<Interaction> consumer, long after, TimeUnit timeUnit)