public class ActionEvent extends Event implements GenericMessageEvent, GenericChannelUserEvent
Constructor and Description |
---|
ActionEvent(PircBotX bot,
UserHostmask userHostmask,
User user,
Channel channel,
String channelSource,
String action,
com.google.common.collect.ImmutableMap<String,String> tags) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getAction()
The action message.
|
Channel |
getChannel()
The channel that the action message was sent in.
|
String |
getChannelSource()
The raw channel name, could be a special mode message eg +#channel that
only goes to voiced users.
|
String |
getMessage()
Returns the action sent by the user.
|
com.google.common.collect.ImmutableMap<String,String> |
getTags()
The IrcV3 tags
|
User |
getUser()
The user that sent the action.
|
UserHostmask |
getUserHostmask()
The user hostmask that sent the action.
|
com.google.common.collect.ImmutableMap<String,String> |
getV3Tags()
Alias of
getTags() |
int |
hashCode() |
void |
respond(String response)
Respond to an action with an action in either the channel that the
message came from or a private message.
|
void |
respondChannel(String response)
Respond with a message to the channel without the prefix
|
void |
respondPrivateMessage(String response)
Respond with a PM directly to the user
|
void |
respondWith(String fullLine)
Like
GenericEvent.respond(String) , without the Username: prefix |
String |
toString() |
compareTo, getBot, getId, getTimestamp
getBot, getTimestamp
compareTo
public String getMessage()
getAction()
getMessage
in interface GenericMessageEvent
public void respond(String response)
Example
* SomeUser thinks that this is awesome * PircBotX agrees
respond
in interface GenericEvent
respond
in class Event
response
- The response to sendpublic void respondWith(String fullLine)
GenericMessageEvent
GenericEvent.respond(String)
, without the Username: prefixrespondWith
in interface GenericMessageEvent
public void respondChannel(String response)
response
- The response to sendpublic void respondPrivateMessage(String response)
respondPrivateMessage
in interface GenericMessageEvent
response
- The response to sendpublic com.google.common.collect.ImmutableMap<String,String> getV3Tags()
getTags()
getV3Tags
in interface GenericMessageEvent
@Generated(value="lombok") public String getChannelSource()
@Generated(value="lombok") public String getAction()
@Generated(value="lombok") public com.google.common.collect.ImmutableMap<String,String> getTags()
@Generated(value="lombok") public UserHostmask getUserHostmask()
getUserHostmask
in interface GenericUserEvent
@Nullable @Generated(value="lombok") public User getUser()
getUser
in interface GenericUserEvent
@Nullable @Generated(value="lombok") public Channel getChannel()
null
means that this is a private message, not a channelgetChannel
in interface GenericChannelEvent
Copyright © 2010–2020 Leon Blakey. All rights reserved.