|
1 | | -# Miso Bot |
2 | | - |
3 | 1 | [](https://github.com/psf/black) |
4 | 2 | [](https://app.codacy.com/manual/joinemm/miso-bot?utm_source=github.com&utm_medium=referral&utm_content=joinemm/miso-bot&utm_campaign=Badge_Grade_Dashboard) |
5 | 3 | [](https://deepsource.io/gh/joinemm/miso-bot/?ref=repository-badge) |
|
8 | 6 | [](https://discord.gg/RzDW3Ne) |
9 | 7 | [](https://www.patreon.com/joinemm) |
10 | 8 | [](https://github.com/sponsors/joinemm) |
11 | | - |
12 | 9 | [](https://ko-fi.com/B0B824LWC) |
13 | 10 |
|
14 | | - |
15 | 11 | * * * |
16 | 12 |
|
17 | | -A discord bot with over 100 commands and features, including but not limited to: |
18 | | - |
19 | | -- Fishing |
20 | | -- LastFM Integration |
21 | | -- Melon charts |
22 | | -- Youtube search |
23 | | -- Twitter media extractor |
24 | | -- Instagram media extractor |
25 | | -- TikTok media extractor |
26 | | -- Moderation (ban, mute, timeout, etc) |
27 | | -- Logs bans, leaves, joins, deleted messages |
28 | | -- Server and user information |
29 | | -- Customizable profiles |
30 | | -- Minecraft server status |
31 | | -- Starboard |
32 | | -- DuckDuckGo bangs |
33 | | -- Colors and color palettes |
34 | | -- Create and search gifs |
35 | | -- Horoscope |
36 | | -- Weather |
37 | | -- Keyword notifications |
38 | | -- Rolepicker |
39 | | -- Color roles |
40 | | -- Typing tests and Typeracer |
41 | | -- Papago Naver and google translator |
42 | | -- Wolfram alpha |
43 | | -- Reminders |
44 | | -- Custom commands |
45 | | -- Configurable prefix |
46 | | -- Cryptocurrency data |
47 | | -- Kpop idol database |
48 | | - |
49 | | -...and much more. Visit <https://misobot.xyz> for more detailed overview of the features. |
| 13 | +# Miso Bot |
50 | 14 |
|
51 | | -## Star History |
| 15 | +Miso is a multipurpose Discord bot with over 100 commands and features. |
52 | 16 |
|
53 | | -[](https://star-history.com/#joinemm/miso-bot&Date) |
| 17 | +For more information and command reference, visit <https://misobot.xyz> |
54 | 18 |
|
55 | | -## Contributor wall |
| 19 | +## Development |
56 | 20 |
|
57 | | -[](https://github.com/joinemm/miso-bot/graphs/contributors) |
| 21 | +A Nix development shell is included, using [devenv](https://github.com/cachix/devenv) |
58 | 22 |
|
59 | | -## Deployment using docker |
| 23 | +This environment installs poetry and some useful packages. |
60 | 24 |
|
61 | | -First copy/rename `.env.example` to `.env` and fill it with your own keys. |
62 | | -Everything else should be handled by the `docker-compose.yml` |
| 25 | +```sh |
| 26 | +nix develop --impure |
| 27 | +``` |
| 28 | + |
| 29 | +The dependencies are managed using [Poetry](https://python-poetry.org/) |
| 30 | + |
| 31 | +```sh |
| 32 | +poetry install |
| 33 | +``` |
63 | 34 |
|
64 | | - $ docker-compose up --build |
| 35 | +The bot can then be run with |
65 | 36 |
|
66 | | -## Deploying locally |
| 37 | +```sh |
| 38 | +poetry run python main.py |
| 39 | +``` |
67 | 40 |
|
68 | | -The dependencies are compiled using pip-tools from `requirements.in` and `dev-requirements.in`. the dev file just adds linters and pre-commit. |
| 41 | +but it will not function without a MariaDB database. |
| 42 | +This makes using docker compose the easiest way to run the bot. |
69 | 43 |
|
70 | | -Installation using pip-tools: |
| 44 | +## Contributing |
71 | 45 |
|
72 | | - $ pip-sync requirements.txt dev-requirements.txt |
| 46 | +Your pull requests are welcome, as long as they meet the code standards enforced by the [pre-commit](https://pre-commit.com/) hooks. |
73 | 47 |
|
74 | | -Installation using pip: |
| 48 | +- [Black](https://github.com/psf/black) and [isort](https://pycqa.github.io/isort/) for formatting. |
| 49 | +- [Ruff](https://github.com/astral-sh/ruff), for linting. |
| 50 | +- [Reuse](https://reuse.software/), for licensing. |
75 | 51 |
|
76 | | - $ pip install -r requirements.txt -r dev-requirements.txt |
| 52 | +To install the hooks, run this command: |
77 | 53 |
|
78 | | -You need to have a mysql/mariadb database running, then run the migrations in `sql/init/...`. After this, you can run the bot: |
| 54 | +```sh |
| 55 | +pre-commit install |
| 56 | +``` |
79 | 57 |
|
80 | | - $ python main.py |
| 58 | +Now your code should be automatically checked for issues when you commit. |
81 | 59 |
|
82 | | -> Note: Running this way, the HTML rendering will not work as it relies on an external docker container. You will have to run that separately. |
| 60 | +## Deployment |
83 | 61 |
|
| 62 | +First copy/rename `.env.example` to `.env` and fill it with your own keys. |
| 63 | +Everything else should be handled by the dockerfile. |
| 64 | + |
| 65 | +```sh |
| 66 | +docker-compose up |
| 67 | +``` |
| 68 | + |
| 69 | +The docker compose file bootstraps the entire miso infrastructure, |
| 70 | +including prometheus metrics, grafana dashboards and nginx reverse proxy. |
| 71 | + |
| 72 | +You likely don't want these if you're just running the bot. |
| 73 | + |
| 74 | +To run only the containers needed for the functionality of the bot, you can specify the service names: |
| 75 | + |
| 76 | +```sh |
| 77 | +docker-compose up db image-server emojifier bot |
| 78 | +``` |
84 | 79 |
|
| 80 | +## Star History |
| 81 | + |
| 82 | +[](https://star-history.com/#joinemm/miso-bot&Date) |
85 | 83 |
|
| 84 | +## Contributor wall |
| 85 | + |
| 86 | +[](https://github.com/joinemm/miso-bot/graphs/contributors) |
0 commit comments