This project is a playground for NoneBot2. Documents for NoneBot2 could be found ->here.
- poetry >= 1.1
Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
Poetry install script: https://github.com/python-poetry/poetry/blob/master/install-poetry.py. To install Poetry, please run this file with a globally installed python interpreter.
- Clone this repo and change working directory:
cd <folder>
. - Run
poetry install -no-root
to install dependencies except this "package". It will create a virtual environment under./.venv/
. - Activate the virtual environment created at the previous step and run
nb run
to start the bot. Nonebot test frontend will be running at: http://localhost:8080/test/ .
nb
is a command fromnb-cli
, which is the cli for NoneBot2.
This directory is used for local plugins. Evary pyhon module (single file or folder module) will be loaded as plugin.
The tools package for this project, which should be imported by like from tools import xxx
.
Configuration for Poetry.
"Package" information for this project. Poetry will use this file to install packages and ./bot.py
will load plugins accordingly as well.
Please install all extensions recommended by this project (via ./.vscode/extensions.json
).
Linting is enabled and engine flake8 is token with default settings.
Formatter black is selected with some configurations in ./pyproject.toml
.
A launch configuration is add to this project, please use the default debugger.
run python -m pytest
to test functions.
Dockerfile has not been edited correctly, some modification may needed.