Package tv.phantombot.event.irc.message
Class IrcModerationEvent
java.lang.Object
tv.phantombot.event.Event
tv.phantombot.event.irc.IrcEvent
tv.phantombot.event.irc.message.IrcMessageEvent
tv.phantombot.event.irc.message.IrcModerationEvent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Determines the harshest action requested by a moderation scriptstatic class
-
Field Summary
Fields inherited from class tv.phantombot.event.irc.message.IrcMessageEvent
message, sender, tags
-
Constructor Summary
ConstructorsConstructorDescriptionIrcModerationEvent
(TwitchSession session, String sender, String message) Class constructor.IrcModerationEvent
(TwitchSession session, String sender, String message, Map<String, String> tags) Class constructor.IrcModerationEvent
(TwitchSession session, String sender, String message, Map<String, String> tags, TMIMessage tmimsg) Class constructor. -
Method Summary
Modifier and TypeMethodDescriptionaction()
Provides aIrcModerationEvent.ModerationAction
that can be used to coordinate executing only the harshest recommended action returned by the various moderation functionsConverts this message into aCommandEvent
void
complete()
Emitsfalse
from the mono, signaling that moderation has not occurred in any handlers and the message is safe to consumeReturns aMono
which emits theonComplete
signal once all moderation hooks have run, reguardless of outcomeboolean
Indicates if this message appears to be a command, defined as exclamation point!
followed by any character except for a spacevoid
Emitstrue
from the mono, signaling that moderation has occurred and further processing of this message should be stoppedmono()
Returns aMono
which emitstrue
if a moderation was performed and further processing of this message should be stoppedtmimsg()
Returns the rawTMIMessage
Methods inherited from class tv.phantombot.event.irc.message.IrcMessageEvent
getMessage, getSender, getTags
Methods inherited from class tv.phantombot.event.irc.IrcEvent
getSession
-
Constructor Details
-
IrcModerationEvent
Class constructor.- Parameters:
session
-sender
-message
-
-
IrcModerationEvent
public IrcModerationEvent(TwitchSession session, String sender, String message, Map<String, String> tags) Class constructor.- Parameters:
session
-sender
-message
-tags
-
-
IrcModerationEvent
public IrcModerationEvent(TwitchSession session, String sender, String message, Map<String, String> tags, TMIMessage tmimsg) Class constructor.- Parameters:
session
-sender
-message
-tags
-
-
-
Method Details
-
mono
Returns aMono
which emitstrue
if a moderation was performed and further processing of this message should be stopped- Returns:
-
completedMono
Returns aMono
which emits theonComplete
signal once all moderation hooks have run, reguardless of outcome- Returns:
-
moderated
public void moderated()Emitstrue
from the mono, signaling that moderation has occurred and further processing of this message should be stopped -
complete
public void complete()Emitsfalse
from the mono, signaling that moderation has not occurred in any handlers and the message is safe to consume -
action
Provides aIrcModerationEvent.ModerationAction
that can be used to coordinate executing only the harshest recommended action returned by the various moderation functions -
isCommand
public boolean isCommand()Indicates if this message appears to be a command, defined as exclamation point!
followed by any character except for a space- Returns:
true
if the message appears to be a command
-
tmimsg
Returns the rawTMIMessage
- Returns:
- The
TMIMessage
-
asCommand
Converts this message into aCommandEvent
- Returns:
null
if#isCommand(java.lang.String)
returnsfalse
; otherwise aCommandEvent
-