A place for all our bot adventures.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
decentral1se 623f2c8bb5
Move functions under the class to unify `self` usage
11 months ago
GlossBot added description for glossbot 1 year ago
GreetBot added description for greetbot 1 year ago
LogBot Move functions under the class to unify `self` usage 11 months ago
LogBot.old following camelcase style :) 1 year ago
RECbot.wip small update 1 year ago
SparkBot added description for sparkbot 1 year ago
StreamBot following camelcase style :) 1 year ago
TransitBot added description for transitbot 1 year ago
WhisperBot updated whisperbot description 1 year ago
echobot Add the rest of the xbotlib bots 12 months ago
glossbot.xbotlib Add the rest of the xbotlib bots 12 months ago
logsbot Add the rest of the xbotlib bots 12 months ago
whisperbot.xbotlib Add the rest of the xbotlib bots 12 months ago
.gitignore Ignore those files 12 months ago
README.md Quote those 12 months ago
requirements.txt Upgrade xbotlib 12 months 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.