Lightweight python IRC Bot
Requirements:
- python3.3 (not tested with older version)
- virtualenv (optional)
- irc
- sqlalchemy
-
Install and source the virtualenv:
virtualenv3 VENV source VENV/bin/activate
-
Install the package:
pip install thealot
-
Copy the default config file:
cp VENV/lib/python<VERSION>/site-packages/thealot/config.json .
-
Edit configuration to fit your needs:
IRC server address that bot should connect to
Port that the bot should use to connect to the server
IRC channel that the bot should join after connecting to the server
Nickname that the bot should attempt to use (if it's taken and underscore is appended until available nickname is found.
Prefix to be used to invoke bot commands
Database URL string acceptable by sqlalchemy.create_engine() to be used by the bot and plugins.
Amount of seconds to wait before attempting to reconnect after a timeout or a lost connetion
a comma separated list of plugin module names to be loaded when bot is started. Example: To run the AlotPlugin install
thealot-alot
package with:pip install thealot-alot
and enable the plugin in the config:
"plgins" : [ "alot" ]
-
Source the virtualenv:
source VENV/bin/activate
-
Run the bot:
python -m thealot.thealot
or
from thealot import TheAlot if __name__ == "__main__": bot = TheAlot() bor.start()