Skip to content

nmarasc/duckbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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