Schnittstelle ITwitchChat

Alle Superschnittstellen:
AutoCloseable
Alle bekannten Implementierungsklassen:
TwitchChat, TwitchChatConnectionPool

public interface ITwitchChat extends AutoCloseable
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    default boolean
    ban(String channel, String user, String reason)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#banUser
    default boolean
    clearChat(String channel)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#deleteChatMessages
    void
     
    default boolean
    delete(String channel, String targetMsgId)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#deleteChatMessages
     
     
    Returns a set of all currently joined channels (without # prefix)
     
    long
     
    default boolean
    isChannelJoined(String channelName)
    Check if Chat is currently in a channel
    void
    joinChannel(String channelName)
    Joins a channel
    boolean
    leaveChannel(String channelName)
    Parts from a channel
    default boolean
    sendActionMessage(String channel, String message)
    Sends an action message (/me) in a joined channel.
    default boolean
    sendAnnouncement(String channel, String message)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#sendChatAnnouncement
    default boolean
    sendMessage(String channel, String message)
    Sends a message in a joined channel.
    default boolean
    sendMessage(String channel, String message, String nonce, String replyMsgId)
    Sends a message to the channel while including an optional nonce and/or reply parent.
    boolean
    sendMessage(String channel, String message, @Nullable Map<String,Object> tags)
    Sends a message to the channel while including the specified message tags.
    default boolean
    setEmoteOnly(String channel, boolean enable)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
    default boolean
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
    default boolean
    setSlowMode(String channel, int seconds)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
    default boolean
    setSubscribersOnly(String channel, boolean enable)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
    default boolean
    setUniqueChat(String channel, boolean enable)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
    default boolean
    timeout(String channel, String user, Duration duration, String reason)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#banUser
    default boolean
    unban(String channel, String user)
    Veraltet.
    Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#unbanUser
  • Methodendetails

    • getEventManager

      EventManager getEventManager()
    • joinChannel

      void joinChannel(String channelName)
      Joins a channel
      Parameter:
      channelName - The target channel name.
    • leaveChannel

      boolean leaveChannel(String channelName)
      Parts from a channel
      Parameter:
      channelName - The target channel name.
      Gibt zurück:
      whether the channel was previously joined
    • sendMessage

      default boolean sendMessage(String channel, String message)
      Sends a message in a joined channel.
      Parameter:
      channel - The target channel name.
      message - The message to be sent.
      Gibt zurück:
      whether the message was added to the queue
    • sendMessage

      default boolean sendMessage(String channel, String message, @Unofficial String nonce, String replyMsgId)
      Sends a message to the channel while including an optional nonce and/or reply parent.
      Parameter:
      channel - the name of the channel to send the message to.
      message - the message to be sent.
      nonce - the cryptographic nonce (optional).
      replyMsgId - the msgId of the parent message being replied to (optional).
      Gibt zurück:
      whether the message was added to the queue
    • sendMessage

      boolean sendMessage(String channel, String message, @Nullable @Nullable Map<String,Object> tags)
      Sends a message to the channel while including the specified message tags.
      Parameter:
      channel - the name of the channel to send the message to.
      message - the message to be sent.
      tags - the message tags.
      Gibt zurück:
      whether the message was added to the queue
    • getChannels

      Set<String> getChannels()
      Returns a set of all currently joined channels (without # prefix)
      Gibt zurück:
      a set of channel names
    • close

      void close()
      Angegeben von:
      close in Schnittstelle AutoCloseable
    • getLatency

      long getLatency()
      Gibt zurück:
      the most recently measured round-trip latency for the socket(s) in milliseconds, or -1 if unknown
    • getChannelIdToChannelName

      Map<String,String> getChannelIdToChannelName()
      Gibt zurück:
      cached mappings of channel ids to names
    • getChannelNameToChannelId

      Map<String,String> getChannelNameToChannelId()
      Gibt zurück:
      cached mappings of channel names to ids
    • isChannelJoined

      default boolean isChannelJoined(String channelName)
      Check if Chat is currently in a channel
      Parameter:
      channelName - channel to check (without # prefix)
      Gibt zurück:
      boolean
    • sendActionMessage

      default boolean sendActionMessage(String channel, String message)
      Sends an action message (/me) in a joined channel.
      Parameter:
      channel - The target channel name.
      message - The message to be sent.
      Gibt zurück:
      whether the message was added to the queue
    • setSlowMode

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean setSlowMode(String channel, int seconds)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
      Configures the slow mode setting for a channel.

      Non-positive values would disable slow mode. Positive values must not be greater than 1800.

      Parameter:
      channel - The target channel name.
      seconds - The slow mode seconds.
      Gibt zurück:
      whether the command was added to the queue
    • setFollowersOnly

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean setFollowersOnly(String channel, Duration time)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
      Configures followers only mode in a channel.

      Passing null (or a negative duration) for time disables followers only. The amount of time must not exceed 3 months.

      Parameter:
      channel - The target channel name.
      time - The amount of time users must be followed.
      Gibt zurück:
      whether the command was added to the queue
    • setSubscribersOnly

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean setSubscribersOnly(String channel, boolean enable)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
      Configures subscribers only mode in a channel.
      Parameter:
      channel - The target channel name.
      enable - Whether the setting should be enabled or disabled.
      Gibt zurück:
      whether the command was added to the queue
    • setUniqueChat

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean setUniqueChat(String channel, boolean enable)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
      Configures unique chat mode (r9k) in a channel.
      Parameter:
      channel - The target channel name.
      enable - Whether the setting should be enabled or disabled.
      Gibt zurück:
      whether the command was added to the queue
    • setEmoteOnly

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean setEmoteOnly(String channel, boolean enable)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#updateChatSettings
      Configures emote only mode in a channel.
      Parameter:
      channel - The target channel name.
      enable - Whether the setting should be enabled or disabled.
      Gibt zurück:
      whether the command was added to the queue
    • clearChat

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean clearChat(String channel)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#deleteChatMessages
      Clears the history for first-party chat clients.
      Parameter:
      channel - The target channel name.
      Gibt zurück:
      whether the command was added to the queue
    • delete

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean delete(String channel, String targetMsgId)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#deleteChatMessages
      Deletes a message.
      Parameter:
      channel - the name of the channel to delete the message from.
      targetMsgId - the unique id of the message to be deleted.
      Gibt zurück:
      whether the command was added to the queue
      Siehe auch:
    • timeout

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean timeout(String channel, String user, Duration duration, String reason)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#banUser
      Timeout a user
      Parameter:
      channel - channel
      user - username
      duration - duration
      reason - reason
      Gibt zurück:
      whether the command was added to the queue
    • ban

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean ban(String channel, String user, String reason)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#banUser
      Ban a user
      Parameter:
      channel - channel
      user - username
      reason - reason
      Gibt zurück:
      whether the command was added to the queue
    • unban

      @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean unban(String channel, String user)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#unbanUser
      Unban a user
      Parameter:
      channel - channel
      user - username
      Gibt zurück:
      whether the command was added to the queue
    • sendAnnouncement

      @Unofficial @Deprecated @ScheduledForRemoval(inVersion="2.0.0") default boolean sendAnnouncement(String channel, String message)
      Veraltet.
      Twitch will decommission this method on February 18, 2023; migrate to TwitchHelix#sendChatAnnouncement
      Send a mod announcement (accented message)
      Parameter:
      channel - the name of the channel to send the announcement in.
      message - the message to be announced.
      Gibt zurück:
      whether the command was added to the queue
      Siehe auch: