antirez / botlib
- воскресенье, 26 ноября 2023 г. в 00:00:07
C Telegram bot framework
WARNING: API is work in progress. Don't consider it reliable until this message is removed.
apikey.txt
inside the bot working directory. Alternatively you can use the --apikey
command line argument to provide your Telegram API key.mybot.c
to personalized the bot.make
../mybot
. There is also a debug mode if you run it using the --debug
option (add --debug multiple times for even more verbose messages). For a more moderate output use --verbose
. Try mybot --help
for the full list of command line options.By default the bot will create an SQLite database in the working directory.
If you want to specify another path for your SQLite db, use the --dbfile
command line option.
... Work in progress ...
For the bot API check mybot.c
example itself. The basic usage is pretty simple. However for all the other stuff, like the Sqlite3 abstractions, they are taken from Stonky, so the code there (which is very accessible) will provide some help. I hope to document this project better. For now my main goal was to stop duplicating Stonly to create new bots with all the common code inside.