A place for all our bot adventures.
Go to file
2021-05-06 22:25:34 +02:00
echobot Add the rest of the xbotlib bots 2021-02-03 09:55:26 +01:00
GlossBot added description for glossbot 2021-01-13 14:52:00 +01:00
glossbot.xbotlib Add the rest of the xbotlib bots 2021-02-03 09:55:26 +01:00
GreetBot added description for greetbot 2021-01-13 14:47:40 +01:00
LogBot updating the README and help text with the new @folder feature :--) 2021-05-06 22:25:34 +02:00
LogBot.old following camelcase style :) 2021-01-22 00:17:37 +01:00
logsbot Add the rest of the xbotlib bots 2021-02-03 09:55:26 +01:00
RECbot.wip small update 2021-01-22 00:32:04 +01:00
SparkBot added description for sparkbot 2021-01-13 14:49:11 +01:00
StreamBot following camelcase style :) 2021-01-22 00:17:37 +01:00
TransitBot added description for transitbot 2021-01-13 14:50:21 +01:00
WhisperBot 'WhisperBot/README.md' updaten 2021-04-28 16:19:06 +02:00
whisperbot.xbotlib 'whisperbot.xbotlib/README.md' updaten 2021-04-28 16:32:21 +02:00
.gitignore Ignore those files 2021-02-03 10:01:49 +01:00
README.md Quote those 2021-02-03 10:55:42 +01:00
requirements.txt removing feedparser to the requirements 2021-03-07 11:07:49 +01:00

 _   _  _____        __  _____ ___    ____   ___ _____
| | | |/ _ \ \      / / |_   _/ _ \  | __ ) / _ \_   _|
| |_| | | | \ \ /\ / /    | || | | | |  _ \| | | || |
|  _  | |_| |\ 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.