Class InteractionEventImpl
java.lang.Object
net.essentialsx.discord.interactions.InteractionEventImpl
- All Implemented Interfaces:
InteractionEvent
A class which provides information about what triggered an interaction event.
-
Constructor Summary
ConstructorDescriptionInteractionEventImpl
(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent jdaEvent) -
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.
-
Constructor Details
-
InteractionEventImpl
public InteractionEventImpl(net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent jdaEvent)
-
-
Method Details
-
reply
Description copied from interface:InteractionEvent
Appends the given string to the initial response message and creates one if it doesn't exist.- Specified by:
reply
in interfaceInteractionEvent
- Parameters:
message
- The message to append.
-
replyTl
Description copied from interface:InteractionEvent
Appends the given string to the initial response message and creates one if it doesn't exist.- Specified by:
replyTl
in interfaceInteractionEvent
- Parameters:
tlKey
- The tlKey of the message to append.args
- The args for the message to append.
-
getMember
Description copied from interface:InteractionEvent
Gets the member which caused this event.- Specified by:
getMember
in interfaceInteractionEvent
- Returns:
- the member which caused the event.
-
getStringArgument
Description copied from interface:InteractionEvent
Get the value of the argument matching the given key represented as a String, or null if no argument by that name is present.- Specified by:
getStringArgument
in interfaceInteractionEvent
- Parameters:
key
- The key of the argument to lookup.- Returns:
- the string value or null.
-
getIntegerArgument
Description copied from interface:InteractionEvent
Get the Long representation of the argument by the given key or null if none by that key is present.- Specified by:
getIntegerArgument
in interfaceInteractionEvent
- Parameters:
key
- The key of the argument to lookup.- Returns:
- the long value or null
-
getBooleanArgument
Description copied from interface:InteractionEvent
Helper method to get the Boolean representation of the argument by the given key or null if none by that key is present.- Specified by:
getBooleanArgument
in interfaceInteractionEvent
- Parameters:
key
- The key of the argument to lookup.- Returns:
- the boolean value or null
-
getUserArgument
Description copied from interface:InteractionEvent
Helper method to get the user representation of the argument by the given key or null if none by that key is present.- Specified by:
getUserArgument
in interfaceInteractionEvent
- Parameters:
key
- The key of the argument to lookup.- Returns:
- the user value or null
-
getChannelArgument
Description copied from interface:InteractionEvent
Helper method to get the channel representation of the argument by the given key or null if none by that key is present.- Specified by:
getChannelArgument
in interfaceInteractionEvent
- Parameters:
key
- The key of the argument to lookup.- Returns:
- the channel value or null
-
getRoleArgument
Description copied from interface:InteractionEvent
Helper method to get the role representation of the argument by the given key or null if none by that key is present.- Specified by:
getRoleArgument
in interfaceInteractionEvent
- Parameters:
key
- The key of the argument to lookup.- Returns:
- the role value or null
-
getChannelId
Description copied from interface:InteractionEvent
Gets the channel ID where this interaction occurred.- Specified by:
getChannelId
in interfaceInteractionEvent
- Returns:
- the channel ID.
-