Class ChannelMessageEvent

All Implemented Interfaces:
com.github.philippheuer.events4j.api.domain.IEvent, MirrorableEvent, ReplyableEvent

public final class ChannelMessageEvent extends AbstractChannelMessageEvent
This event gets called when a message is received in a channel.
  • Constructor Details

    • ChannelMessageEvent

      public ChannelMessageEvent(EventChannel channel, IRCMessageEvent messageEvent, EventUser user, String message)
      Event Constructor
      Parameters:
      channel - The channel that this event originates from.
      messageEvent - The raw message event
      user - The user who triggered the event.
      message - The plain text of the message.
  • Method Details

    • isHighlightedMessage

      @Unofficial public boolean isHighlightedMessage()
      Returns:
      whether "Highlight My Message" was redeemed for this event
    • isSkipSubsModeMessage

      @Unofficial public boolean isSkipSubsModeMessage()
      Returns:
      whether "Send a Message in Sub-Only Mode" was redeemed for this event
    • getCustomRewardId

      @Unofficial public Optional<String> getCustomRewardId()
      Returns:
      the id for the custom reward that was redeemed with this associated message, in an optional wrapper
    • isDesignatedFirstMessage

      @Unofficial public boolean isDesignatedFirstMessage()
      Returns:
      whether this is the user's first message in the channel.
      See Also:
      API Note:
      This method is marked as unofficial since this tag does not appear in the irc guide.
    • isUserIntroduction

      @Unofficial public boolean isUserIntroduction()
      Returns:
      whether this message constitutes the user's designated introduction.
      See Also:
      API Note:
      This method is unofficial since the experiment is not officially documented in the irc guide.
    • hasGiganticEmote

      @Unofficial public boolean hasGiganticEmote()
      Returns:
      whether the message is a "Gigantify an Emote" bits redemption
      See Also:
      API Note:
      This method is unofficial since the msg-id is not documented in the irc guide.
    • hasMessageEffects

      @Unofficial public boolean hasMessageEffects()
      Returns:
      whether the message is a "Message Effects" bits redemption
      See Also:
      API Note:
      This method is unofficial since the msg-id is not documented in the irc guide.
    • getAnimationId

      @Unofficial public Optional<String> getAnimationId()
      Returns:
      returns the animation id associated with the "Message Effects" bits redemption. Possible values include "cosmic-abyss", "simmer", and "rainbow-eclipse".
      See Also:
      API Note:
      This method is unofficial since the tag is not documented in the irc guide.
    • getElevatedChatPayment

      public Optional<DonationAmount> getElevatedChatPayment()
      Hype Chat Contribution
      Returns:
      the payment information related to this hype chat, if applicable.
      See Also:
    • getHypeChatLevel

      public Optional<HypeChatLevel> getHypeChatLevel()
      Returns:
      the HypeChatLevel associated with the hype chat contribution.
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class AbstractChannelMessageEvent
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractChannelMessageEvent
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class AbstractChannelMessageEvent
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractChannelMessageEvent
    • getReplyInfo

      @Nullable public @Nullable ChatReply getReplyInfo()
      Information regarding the parent message being replied to, if applicable.
    • getChantInfo

      Information regarding any associated Crowd Chant for this message, if applicable.