Anna Li <3
A discord bot to help a developer. Maybe after prototyping here I'll build out one of her features onto a dedicate bot.
annalibot is feature rich, each cog contains multiple features.
Use: annali help
in discord for a list of commands.
cogs:
- kakTracker: Helps manage waifus and track kakera for the popular Mudae discord bot.
- short: Link shortener service, utilizes cookieandrock.dev web service.
Installing annalibot requires that you have populated the config file and remove the template
from the name of the file. Information includes discord bot api key as well as mongodb information.
It's highly recommended to use a virtual environment before continuing.
Use the pip freeze python module to download all required packages.
pip3 install -r requirements.txt
Running annalibot with a simple command:
python3 -B annapythonli.py
If you want her to reboot after running annali close
command then run with:
python3 -B annali_marathon.py
If you want logging and persistance after logging off:
nohup python -B annapythonli.py >> /path/to/log/file.log 2>> /path/to/log/file.err.log &
example:
nohup python -B annapythonli.py >> ../log/annapythonli.log 2>> ../log/annapythonli.err.log &
Replace the paths with proper paths to your log dirs.
To keep annalibot up-to-date is easy to do even from discord!
annali pull
Performs a git pullannali reload
Reloads all cogs (do this after a pull)annali close
Closes theannapythonli.py
instance (run with marathon for automatic reboot)annali xload
Runtime cog controllerannali free
Checks memory on machine (only for linux)annali press
Sets presence
Developing on annalibot is easy!
source ../venv/bin/activate; python -B annapythonli.py >> ../log/annapythonli.log 2>> ../log/annapythonli.err.log
Make sure to get a working mongodb instance running always. annalibot uses this to save data.
(Working on getting unit tests...) But for testing on the fly I do:
0. Change config to have differet bot prefix ($
) and set DEV_MODE=True
0. Make change and save file
0. If it is not changing config/annapythonli.py then in discord type &reload
0. Test changes made
This is much faster than rebooting annalibot since reloading cogs takes very little effort