Interface InteractionEvent
- All Known Implementing Classes:
InteractionEventImpl
public interface InteractionEvent
Represents a triggered interaction event.
-
Method Summary
Modifier and TypeMethodDescriptiongetBooleanArgument
(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.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.Gets the channel ID where this interaction occurred.getIntegerArgument
(String key) 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.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.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.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.void
Appends the given string to the initial response message and creates one if it doesn't exist.void
Appends the given string to the initial response message and creates one if it doesn't exist.
-
Method Details
-
reply
Appends the given string to the initial response message and creates one if it doesn't exist.- Parameters:
message
- The message to append.
-
replyTl
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
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
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
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
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
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
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.
-