Interface MessageAction

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MessageAction
Represent what to do when you are trigger by the chat message.
It is used when you build a TwitchBot with method TwitchBot.withActionOnMessage(MessageAction)
You can for instance send `Hello world` on each message with :
new TwitchBot(user, token).withActionOnMessage((bot, message) -> bot.send(message.getStreamerName(), "Hello World")
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute something to do on the last message on the twitch chat.
  • Method Details

    • execute

      void execute(ConnectedTwitchBot bot, Message message)
      execute something to do on the last message on the twitch chat.
      Parameters:
      bot - the bot when it is connected to the twitch socket
      message - the last message of the twitch chat