ccl
173cedda99
|
2 years ago | |
---|---|---|
GlossBot | 4 years ago | |
GreetBot | 4 years ago | |
LogBot | 2 years ago | |
LogBot.old | 4 years ago | |
RECbot.wip | 4 years ago | |
SparkBot | 4 years ago | |
StreamBot | 4 years ago | |
TransitBot | 4 years ago | |
WhisperBot | 4 years ago | |
echobot | 4 years ago | |
glossbot.xbotlib | 4 years ago | |
logsbot | 4 years ago | |
whisperbot.xbotlib | 4 years ago | |
.gitignore | 4 years ago | |
README.md | 2 years ago | |
requirements.txt | 3 years ago |
README.md
_ _ _____ __ _____ ___ ____ ___ _____
| | | |/ _ \ \ / / |_ _/ _ \ | __ ) / _ \_ _|
| |_| | | | \ \ /\ / / | || | | | | _ \| | | || |
| _ | |_| |\ V V / | || |_| | | |_) | |_| || |
|_| |_|\___/ \_/\_/ |_| \___/ |____/ \___/ |_|
status: experimental
Bots
The Varia XMPP botspace. These bots are written using
slixmpp
and sometimes also
xbotlib
.
Write your own
The idea is that you create a single python file and then using one of the
above libraries, you write a single Python class which knows how to speak XMPP,
join rooms, respond to commands etc. Probably the simplest place to start is by
reading the xbotlib
getting started guide.
Deploy it on the Varia server
Add a configuration entry to /etc/supervisor/conf.d/bots.conf
like the following.
[program:whisperbot]
directory=/srv/gitea/clones/bots/whisperbot.xbotlib
user=bot
autostart=true
autorestart=true
environment=PATH="/srv/gitea/clones/bots/.venv/lib/python3.7/site-packages:%(ENV_PATH)s"
command=/srv/gitea/clones/bots/.venv/bin/python3 whisperbot.py --password <YOUR-PASSWORD>
Then systemctl restart supervisorctl
and then check if it comes up with
supervisorctl status bots:
. Logs for all bots can be found in
/var/log/supervisor/
. Finally, when you git push your bot changes, a git hook
will restart your bot.
Stop and start bots
For example logbot:
supervisorctl status bots:logbot
supervisorctl start bots:logbot
supervisorctl stop bots:logbot
supervisorctl restart bots:logbot