Skip to content

joinemm/miso-bot

Repository files navigation

noai

License Code style: black Codacy Badge DeepSource Discord Sponsor


Miso Bot

Miso is a multipurpose Discord bot with over 100 commands and features.

For more information and command reference, visit https://misobot.xyz

Development

A Nix development shell is included, using devenv

This environment installs poetry and some useful packages.

nix develop --impure

The dependencies are managed using Poetry

poetry install

Copy/rename .env.example to .env and fill the api keys you need, most importantly the discord bot token. The bot can then be run with

poetry run python main.py
# or in dev mode
poetry run python main.py dev

# if using the nix shell:

run
# or in dev mode
run dev

but it will not function without a MariaDB database. The database can be bootstrapped with

docker compose up db -d

After which the bot can be ran and easily developed. When you're done, remember to shut down the database container:

docker compose down

Contributing

Your pull requests are welcome, as long as they meet the enforced code standards:

The nix shell installs these as pre-commit hook automatically.

Deployment

First copy/rename .env.example to .env and fill it with your own keys. Everything else should be handled by the dockerfile.

docker compose --profile prod up

The docker compose file bootstraps the entire miso infrastructure, including prometheus metrics, grafana dashboards and nginx reverse proxy.

You likely don't want these if you're just running the bot.

The compose file is using different profiles that start only a handful of containers: dev, dev-extra and prod. prod starts everything, as you might have guessed. dev starts only the db and the bot in debug mode, for fast testing. dev-extra starts extra services used by some commands, but not the infra containers.

docker compose --profile dev up
docker compose --profile dev-extra up

Star History

Star History Chart

Contributor wall

Contributors