This repository contains a Rocket.Chat bot based on the realtime api.
An example on how to use this bot can be found in main.py.
The core of this bot framework is the master.py which handles a collection of bots. Bots themselves can be individually assembled by the various mixin classes in:
bots/accesscontrol.py: Allow/disallow rooms/roomtypesbots/messagefilter.py: Filter messages by user, by mentions, ...bots/messagehandler.py: Take actions by incoming messages
- Clone this repo.
- Rename
bot_config.py.dist.pytobot_config.pyand adjust the config values to your environment. - Start the bot:
- Via python:
pip install -r requirements.txt python3 main.py- Via docker:
docker build --tag=rocketbot . docker run -v ${PWD}:/bot rocketbot- Via docker-compose:
bot: build: ./rocketbot volumes: - ./rocketbot:/bot command: python3 main.py