nmarasc / duckbot

Python port of a previous project
MIT License
2 stars 0 forks source link
bots ducks help not-javascript python python3 sentience slack-api slack-bot

Duckbot

General purpose slack bot

Current version: 2.3.0
main.py is the driver for the bot. It handles creating the bot, connecting to slack, and the rtm read loop
duckbot.py sets up the event handlers, assigning them appropriately and sending messages
eventHandlers.py contains all the event handlers and their specific parsers
commandHandlers.py contains the handlers for bot commands
util.py contains various utility functions, such as ID matching and exit codes

Bot return codes:

RC=0x exit codes are special meaning codes, usually for signalling monitor script
    RC=00 , bot exited normally and will not restart
    RC=01 , there was an uncaught python error and will not restart. Likely needs manual fixing
    RC=02 , bot exited normally and will restart after updating

RC=1x exit codes signify an error during bot set up
    RC=10 , invalid bot id was returned to bot, should restart
    RC=11 , failed to connect to RTM, possible network hiccup, should restart

RC=2x exit codes signify an error during rtm use
    RC=20 , generic error during RTM read, should restart
    RC=21 , timeout error during RTM read, should restart

RC=3x exit codes signify an error during command processing
    RC=30 , malformed user id found