Class CommandActionEvent
- java.lang.Object
-
- me.s3ns3iw00.jcommands.event.CommandEvent
-
- me.s3ns3iw00.jcommands.event.type.CommandActionEvent
-
public class CommandActionEvent extends CommandEvent
An event that is provided byCommandActionEventListener
Contains the
ChannelCategory
where the command was used and theArgumentResult
that is the result of the arguments
-
-
Constructor Summary
Constructors Constructor Description CommandActionEvent(Command command, org.javacord.api.entity.user.User sender, CommandResponder responder, org.javacord.api.entity.channel.TextChannel channel, ArgumentResult[] arguments)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArgumentResult[]
getArguments()
java.util.Optional<org.javacord.api.entity.channel.TextChannel>
getChannel()
Gets the channel where the action has been happened-
Methods inherited from class me.s3ns3iw00.jcommands.event.CommandEvent
getCommand, getResponder, getSender
-
-
-
-
Constructor Detail
-
CommandActionEvent
public CommandActionEvent(Command command, org.javacord.api.entity.user.User sender, CommandResponder responder, org.javacord.api.entity.channel.TextChannel channel, ArgumentResult[] arguments)
-
-
Method Detail
-
getChannel
public java.util.Optional<org.javacord.api.entity.channel.TextChannel> getChannel()
Gets the channel where the action has been happened- Returns:
- an
Optional.empty()
when the action happened in private message, otherwise anOptional.of(Object)
with the channel
-
getArguments
public ArgumentResult[] getArguments()
-
-