Package com.github.twitch4j.chat.events
Class CommandEvent
java.lang.Object
com.github.philippheuer.events4j.core.domain.Event
com.github.twitch4j.chat.events.TwitchEvent
com.github.twitch4j.chat.events.CommandEvent
- All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent
This event gets called when a message is received in a channel.
-
Constructor Summary
ConstructorsConstructorDescriptionCommandEvent(CommandSource source, String sourceId, EventUser user, String commandPrefix, String command, Set<CommandPermission> permissions) Event Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanCommandCommand PrefixPermissions of the userSource: channel / privateMessageSource Id: channelName or userNamegetUser()UserinthashCode()voidrespondToUser(String message) Respond to the command origin (channel or private)toString()Methods inherited from class com.github.twitch4j.chat.events.TwitchEvent
getTwitchChatMethods inherited from class com.github.philippheuer.events4j.core.domain.Event
getEventId, getFiredAt, getFiredAtInstant, getServiceMediator, setEventId, setFiredAt, setFiredAtInstant, setServiceMediator
-
Constructor Details
-
CommandEvent
public CommandEvent(CommandSource source, String sourceId, EventUser user, String commandPrefix, String command, Set<CommandPermission> permissions) Event Constructor- Parameters:
source- Source (used for response method)sourceId- Source Id (used for response method)user- The user who triggered the event.commandPrefix- The command prefix used.command- The plain command without prefix.permissions- The permissions of the triggering user.
-
-
Method Details
-
respondToUser
Respond to the command origin (channel or private)- Parameters:
message- Message
-
toString
- Overrides:
toStringin classTwitchEvent
-
getSource
Source: channel / privateMessage -
getSourceId
Source Id: channelName or userName -
getUser
User -
getCommandPrefix
Command Prefix -
getCommand
Command -
getPermissions
Permissions of the user -
equals
- Overrides:
equalsin classTwitchEvent
-
canEqual
- Overrides:
canEqualin classTwitchEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classTwitchEvent
-