Package io.github.jtwitch.action
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.
Represent what to do when you are trigger by the chat message.
It is used when you build a
You can for instance send `Hello world` on each message with :
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 TypeMethodDescriptionvoid
execute(ConnectedTwitchBot bot, Message message)
execute something to do on the last message on the twitch chat.
-
Method Details
-
execute
execute something to do on the last message on the twitch chat.- Parameters:
bot
- the bot when it is connected to the twitch socketmessage
- the last message of the twitch chat
-