Klasse IRCMessageEvent
java.lang.Object
com.github.philippheuer.events4j.core.domain.Event
com.github.twitch4j.chat.events.TwitchEvent
com.github.twitch4j.chat.events.channel.IRCMessageEvent
- Alle implementierten Schnittstellen:
com.github.philippheuer.events4j.api.domain.IEvent
This event gets called when we receive a raw irc message.
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungIRCMessageEvent(@NotNull String rawMessage, @NotNull Map<String, CharSequence> escapedTags, CharSequence clientName, @NotNull String commandType, @Nullable String channelName, @Nullable CharSequence payload, @Nullable String message, @NotNull Map<String, String> channelIdToChannelName, @NotNull Map<String, String> channelNameToChannelId, @Nullable Collection<String> botOwnerIds) IRCMessageEvent(String rawMessage, Map<String, String> channelIdToChannelName, Map<String, String> channelNameToChannelId, Collection<String> botOwnerIds) Veraltet. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected booleanbooleanGet ChatChannelChannel IdMessage TypeTagsgetFlags()AutoMod Message Flag Indicators, relevant for PRIVMSG and USERNOTICEThe message UUID that is used for deletion by a moderator or a chat reply (from Tags)getNonce()RAW MessageVeraltet.in favor ofgetEscapedTags()getRawTagString(@NotNull String name) getTags()Veraltet.in favor ofgetTagValue(String)orgetEscapedTags()getTagValue(String tagName) Gets a optional tag from the irc messageGet Target UserGets the Target User Id (from Tags)getUser()Get UserGets the User Id (from Tags)Gets the User Name (from Tags)inthashCode()isValid()Veraltet.MessageParser.parse(String)yields null for invalid messagesparseClientName(String raw) Veraltet.This method is no longer used by twitch4jstatic Map<String, CharSequence> Veraltet.This method is no longer used by twitch4jtoString()Von Klasse geerbte Methoden com.github.twitch4j.chat.events.TwitchEvent
getTwitchChatVon Klasse geerbte Methoden com.github.philippheuer.events4j.core.domain.Event
getEventId, getFiredAt, getFiredAtInstant, getServiceMediator, setEventId, setFiredAt, setFiredAtInstant, setServiceMediator
-
Felddetails
-
NONCE_TAG_NAME
- Siehe auch:
-
-
Konstruktordetails
-
IRCMessageEvent
@Internal public IRCMessageEvent(@NotNull @NotNull String rawMessage, @NotNull @NotNull Map<String, CharSequence> escapedTags, CharSequence clientName, @NotNull @NotNull String commandType, @Nullable @Nullable String channelName, @Nullable @Nullable CharSequence payload, @Nullable @Nullable String message, @NotNull @NotNull Map<String, String> channelIdToChannelName, @NotNull @NotNull Map<String, String> channelNameToChannelId, @Nullable @Nullable Collection<String> botOwnerIds) -
IRCMessageEvent
@Deprecated public IRCMessageEvent(String rawMessage, Map<String, String> channelIdToChannelName, Map<String, String> channelNameToChannelId, Collection<String> botOwnerIds) Veraltet.UseMessageParser.parse(String, Map, Map, Collection)to createIRCMessageEventinstancesEvent Constructor- Parameter:
rawMessage- The raw message.channelIdToChannelName- Mapping used to lookup a missing channel name in the eventchannelNameToChannelId- Mapping used to lookup a missing channel id in the eventbotOwnerIds- The bot owner ids.
-
-
Methodendetails
-
getBadgeInfo
- Gibt zurück:
- metadata related to the chat badges in the badges tag
-
getBadges
- Gibt zurück:
- the visible chat badges parsed from tags
-
getClientPermissions
- Gibt zurück:
- the permissions of the client that sent this message, based on visible badges
-
isValid
Veraltet.MessageParser.parse(String)yields null for invalid messagesChecks if the Event was parsed correctly.- Gibt zurück:
- Is the Event valid?
-
parseTags
@Deprecated @ScheduledForRemoval(inVersion="2.0.0") public static Map<String,CharSequence> parseTags(String raw) Veraltet.This method is no longer used by twitch4jParse Tags from raw list- Parameter:
raw- The raw list of tags.- Gibt zurück:
- A key-value map of the tags.
-
parseClientName
@Deprecated @ScheduledForRemoval(inVersion="2.0.0") public static Optional<String> parseClientName(String raw) Veraltet.This method is no longer used by twitch4jGets the ClientName from the IRC User Identifier (:user!user@user.tmi.twitch.tv)- Parameter:
raw- Raw ClientName- Gibt zurück:
- Client name, or empty.
-
getUserId
Gets the User Id (from Tags)- Gibt zurück:
- Long userId
-
getUserName
Gets the User Name (from Tags)- Gibt zurück:
- String userName
-
getUserDisplayName
- Gibt zurück:
- the display name of the user who sent this message, if applicable
-
getUserChatColor
- Gibt zurück:
- hexadecimal RGB color code of the user's chat color, or empty if it is never set.
-
getTargetUserId
Gets the Target User Id (from Tags)- Gibt zurück:
- Long targetUserId
-
getMessageId
The message UUID that is used for deletion by a moderator or a chat reply (from Tags)- Gibt zurück:
- the unique ID for the message
-
getNonce
- Gibt zurück:
- the client nonce for the message.
-
getSubscriberMonths
- Gibt zurück:
- the exact number of months the user has been a subscriber, or empty if they are not subscribed
-
getSubscriptionTier
- Gibt zurück:
- the tier at which the user is subscribed, or empty if they are not subscribed or have the founders badge equipped
-
getCheererTier
- Gibt zurück:
- the tier of the bits badge of the user, or empty if there is no bits badge present (which can also occur for bits leaders)
-
getPredictedChoiceIndex
- Gibt zurück:
- the index of the choice this user is predicting, in an optional wrapper
-
getPredictedChoiceTitle
- Gibt zurück:
- the title of the choice this user is predicting, in an optional wrapper
-
getTagValue
Gets a optional tag from the irc message- Parameter:
tagName- The tag of the irc message- Gibt zurück:
- String tagValue
-
getUser
Get User- Gibt zurück:
- ChatUser
-
getTargetUser
Get Target User- Gibt zurück:
- ChatUser
-
getChannel
Get ChatChannel- Gibt zurück:
- ChatChannel
-
getChannelName
- Gibt zurück:
- the channel name associated with this event, if applicable
-
getPayload
- Gibt zurück:
- IRC message payload, which includes a colon prefix, unlike
getMessage()
-
getMessage
- Gibt zurück:
- the message sent by a user to an IRC channel
-
getClientName
- Gibt zurück:
- the client name associated with the message, excluding the hostname
-
getRawTag
- Parameter:
name- the tag key- Gibt zurück:
- the (not escaped) tag value associated with the specified key, in
CharSequenceform
-
getRawTagString
- Parameter:
name- the tag key- Gibt zurück:
- the (not escaped) tag value associated with the specified key, in
Stringform
-
getTags
Veraltet.in favor ofgetTagValue(String)orgetEscapedTags()- Gibt zurück:
- raw (i.e., not unescaped) IRCv3 tags
-
getRawTags
Veraltet.in favor ofgetEscapedTags()- Gibt zurück:
- IRCv3 tags
-
toString
- Setzt außer Kraft:
toStringin KlasseTwitchEvent
-
getEscapedTags
TagsMost applications should utilize
getTagValue(String)rather than accessing this map directly. -
getCommandType
Message Type -
getChannelId
Channel Id -
getRawMessage
RAW Message -
equals
- Setzt außer Kraft:
equalsin KlasseTwitchEvent
-
canEqual
- Setzt außer Kraft:
canEqualin KlasseTwitchEvent
-
hashCode
public int hashCode()- Setzt außer Kraft:
hashCodein KlasseTwitchEvent
-
getFlags
AutoMod Message Flag Indicators, relevant for PRIVMSG and USERNOTICE
-
MessageParser.parse(String, Map, Map, Collection)to createIRCMessageEventinstances