The baddest bot in the game right now. Uses the ch.py Chatango framework for joining and listening for user messages. If a user's chat is a command (starts with
!), a function will be fired depending on the type of command.
A directory of all commands can be found here.
Chat commands have 3 properties:
- Command name: Text which triggers a command (ie: !test)
- Response: Value returned by a command, either to be sent directly as a chat, or additionally processed depending on command type.
- Type: Determines logic associated with a command.
Download the repo and install dependencies:
$ git clone https://github.com/toddbirchard/acleebot.git $ cd acleebot $ pipenv update
.env file with your Chatango configuration:
ROOM=yourchatangoroom USERNAME=yourbotusername PASSWORD=yourbotpassword SQLALCHEMY_DATABASE_URI=yourdatabaseuri SQLALCHEMY_DATABASE_NAME=yourdatabasename SQLALCHEMY_TABLE=yourdatabbasetable SQLALCHEMY_DB_SCHEMA=yourpostgresschema
Run the script:
$ pipenv shell $ python3 main.py