A simple bot framework for Signal
This is a simple bot system for Signal with minimal dependencies. Pure Java and cross platform.
gradlew installDist
should generate a run script at 'build/install/signal-bot/bin/signal-bot'.
signal-bot --register-text +12223334444
(change the phone number to any number that you can receive an SMS on.)
register-text
with register-voice
.signal-bot --verify 123-456
(change the number to the code you received.)signal-bot --listen
. You should be able to then message the bot and see your messages in the log.
kill -2
to allow it to shut down and disconnect gracefully from the Signal service.signal-bot --test
. This will start a simple input loop that sends your messages to the bot and sends the response to stdout. This doesn't use the Signal service.SignalBot.Responder
. For example, this will echo back every message received:package com.woodencloset.signalbot.responders;
import com.woodencloset.signalbot.SignalBot;
public class EchoResponder implements SignalBot.Responder {
@Override
public String getResponse(String messageText) {
return messageText;
}
}
bot.addResponder(new EchoResponder());
to the Main
class (as an example, there is a DiceRollResponder
included and added already.)