Package to build Signal bots
Project description
Signal Bot Framework
Python package to build your own Signal bots. To run the the bot you need to start the signal-cli-rest-api service and link your device with it.
Todos
- Examples on how to use the package
- Documentation
- Github actions to build on release
Classes and API
Signalbot
bot = Signalbot({
"signal_service": "127.0.0.1:8080"
"phone_number": "+49123456789"
"storage": {
"redis_host": "redis"
"redis_port": 6379
}
})
bot.listen(group_id, group_secret)
: Listen for messages in a groupbot.register(command)
: Register a new commandbot.start()
: Start the botbot.send(receiver, text)
: Send a new messagebot.react(message, emoji)
: React to a messagebot.start_typing(receiver)
: Start typingbot.stop_typing(receiver)
: Stop typingbot.scheduler
: APScheduler > AsyncIOScheduler, see herebot.storage
: In-memory or Redis stroage, seestorage.py
Command
cmd.setup()
: Start any task that requires to send messages already, optionalcmd.describe()
: String to describe your command, optionalcmd.handle(context)
: Handle an incoming message. By default, any command will read any incoming message. Context can be used to easily reply (c.send(text)
), react (c.react(emoji)
) and to type in a group (c.start_typing()
andc.stop_typing()
).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
signalbot-0.0.4.tar.gz
(8.5 kB
view hashes)
Built Distribution
Close
Hashes for signalbot-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7cf4afe7bbd85f1376053b3801eaccf4218e4f84ca23e95cbc63acad8734da3 |
|
MD5 | f49ebe11488764d1e5c68ad4b2a1d1bd |
|
BLAKE2b-256 | 9d95a634bab9366799a5e268c202a3a5f37f9dc2b82d9b6def2271f35a940dd7 |