Interface InteractionEvent

All Known Implementing Classes:
InteractionEventImpl

public interface InteractionEvent
Represents a triggered interaction event.
  • Method Summary

    Modifier and Type
    Method
    Description
    Helper method to get the Boolean representation of the argument by the given key or null if none by that key is present.
    Helper method to get the channel representation of the argument by the given key or null if none by that key is present.
    Gets the channel ID where this interaction occurred.
    Get the Long representation of the argument by the given key or null if none by that key is present.
    Gets the member which caused this event.
    Helper method to get the role representation of the argument by the given key or null if none by that key is present.
    Get the value of the argument matching the given key represented as a String, or null if no argument by that name is present.
    Helper method to get the user representation of the argument by the given key or null if none by that key is present.
    void
    reply(String message)
    Appends the given string to the initial response message and creates one if it doesn't exist.
    void
    replyTl(String tlKey, Object... args)
    Appends the given string to the initial response message and creates one if it doesn't exist.
  • Method Details

    • reply

      void reply(String message)
      Appends the given string to the initial response message and creates one if it doesn't exist.
      Parameters:
      message - The message to append.
    • replyTl

      void replyTl(String tlKey, Object... args)
      Appends the given string to the initial response message and creates one if it doesn't exist.
      Parameters:
      tlKey - The tlKey of the message to append.
      args - The args for the message to append.
    • getMember

      InteractionMember getMember()
      Gets the member which caused this event.
      Returns:
      the member which caused the event.
    • getStringArgument

      String getStringArgument(String key)
      Get the value of the argument matching the given key represented as a String, or null if no argument by that name is present.
      Parameters:
      key - The key of the argument to lookup.
      Returns:
      the string value or null.
    • getIntegerArgument

      Long getIntegerArgument(String key)
      Get the Long representation of the argument by the given key or null if none by that key is present.
      Parameters:
      key - The key of the argument to lookup.
      Returns:
      the long value or null
    • getBooleanArgument

      Boolean getBooleanArgument(String key)
      Helper method to get the Boolean representation of the argument by the given key or null if none by that key is present.
      Parameters:
      key - The key of the argument to lookup.
      Returns:
      the boolean value or null
    • getUserArgument

      InteractionMember getUserArgument(String key)
      Helper method to get the user representation of the argument by the given key or null if none by that key is present.
      Parameters:
      key - The key of the argument to lookup.
      Returns:
      the user value or null
    • getChannelArgument

      InteractionChannel getChannelArgument(String key)
      Helper method to get the channel representation of the argument by the given key or null if none by that key is present.
      Parameters:
      key - The key of the argument to lookup.
      Returns:
      the channel value or null
    • getRoleArgument

      InteractionRole getRoleArgument(String key)
      Helper method to get the role representation of the argument by the given key or null if none by that key is present.
      Parameters:
      key - The key of the argument to lookup.
      Returns:
      the role value or null
    • getChannelId

      String getChannelId()
      Gets the channel ID where this interaction occurred.
      Returns:
      the channel ID.