A simple IRC bot which allows easily integrating new commands. See the Extending for information on how to add new plugins.
- Docker
- Docker-compose
- Run
docker-compose up
Create a .env
file (see .env.example
) with the required environment or
change the environments in docker-compose.yaml
.
New commands may be added by creating a new command file in src/modules
, and
implementing the following class:
from core.plugins import Plugin, register_plugin
@register_plugin(
name="weather", description="check the weather", arguments="amsterdam paris ..."
)
class CommandName(Plugin):
async def __call__(self, msg: Sequence[str]) -> str:
...
This will create a new command on the name of weather
. The command supports
multiple cities to be queried. For example, user X sends commandname arg1 arg2
,
thus msg will be [arg1, arg2]
.
- Add test cases. This started as one simple
main.py
, so I didn't care much on testing. - Add more usable plugins
Distributed under the MIT License. See LICENSE
for more information.