Class ConnectedTwitchBot

java.lang.Object
io.github.jtwitch.socket.ConnectedTwitchBot

public class ConnectedTwitchBot extends Object
Represent a Twitch bos when it is connected. Before it is connected, you can't join a channel or send a message.
To create a connection you need to use TwitchBot.connect().
  • Constructor Details

  • Method Details

    • join

      public ConnectedTwitchBot join(String streamer)
      Join a streamer channel.
      Parameters:
      streamer - the channel to join
      Returns:
      itself
    • leave

      public ConnectedTwitchBot leave(String streamer)
      Leave a streamer channel
      Parameters:
      streamer - the channel to quit
      Returns:
      itself
    • send

      public void send(String streamer, String message)
      send a message to a specific channel.
      Parameters:
      streamer - the channel to send a message
      message - the message to send
    • answer

      public void answer(Message messageToAnswer, String message)
      reply to a message.
      Parameters:
      messageToAnswer - the targeted message to answer
      message - the message to send
    • whisper

      public void whisper(String user, String message)
      This command sends a private message to another user on Twitch.
      Parameters:
      user - the targeted user to whisper
      message - the message to whisper
    • mention

      public void mention(String user, String streamer, String message)
      Mention a specific user on a specific channel.
      Parameters:
      user - the user to mention
      streamer - the channel where to mention it
      message - the message
    • command

      public void command(String streamer, Command command)
      send command to a specific channel. You need to use Commands repository.
      Parameters:
      streamer - the channel where to send the command
      command - the command to send. it can be find by Commands
    • delete

      public void delete(Message message)
      delete a message.
      Parameters:
      message - the targeted message to delete
    • sendRawSocketMessage

      public void sendRawSocketMessage(String message)
      send a raw command to the socket.
      Warning : Use this command only if a specific command does not exist in the wrapper.
      Parameters:
      message - the raw socket message