From bc4610a9550e78b8c3d1097376000d557c41ea1b Mon Sep 17 00:00:00 2001 From: ziro Date: Thu, 5 Jan 2023 17:33:57 +0700 Subject: [PATCH] docs(README): README.md got reverted --- README.md | 74 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 0ffaf9c7..ee5c1b9f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,49 @@ More feature coming soon! ### Self-Hosting -> **NOTE**: Python 3.8+ is required to host this bot! +#### Docker + +- Install [Docker](https://docs.docker.com/install/) and [Docker-Compose](https://docs.docker.com/compose/install/) +- Create `docker-compose.yaml` file or use the one from [`docker/compose-examples`](./docker/compose-examples): + + ```yaml + version: "3" + + services: + bot: + container_name: zibot + image: ghcr.io/ziro-bot/z3r0:latest + volumes: + - "./data:/app/data" + - "./config.py:/app/config.py" + ``` + +- Then run: + + ```zsh + docker-compose up -d + + # or if you want to use one of the sample yaml file + docker-compose -f docker/compose-examples/basic/docker-compose.yml up -d + ``` + +> Since 3.5.0, ziBot support environment variables, added specifically for Docker + +| Env | Json | Description | +|-----|------|-------------| +| ZIBOT\_TOKEN | token | **REQUIRED**. Discord Bot's token, without it you can't run the bot at all. You can get it on https://discord.com/developers/applications | +| ZIBOT\_DB\_URL | sql | **REQUIRED**. The bot's database url. Format: `DB_TYPE://PATH_OR_CREDENTIALS/DB_NAME?PARAM1=value&PARAM2=value`, you can visit [TortoiseORM's documentation](https://tortoise.github.io/databases.html#db-url) to learn more about it | +| ZIBOT\_BOT\_MASTERS | botMasters | Separated by spaces. The bot's master(s), allows listed user(s) to execute master/dev only commands. By default it'll get whoever owns the bot application | +| ZIBOT\_ISSUE\_CHANNEL | issueChannel | Channel that the bot will use to send reported errors | +| ZIBOT\_OPEN\_WEATHER\_TOKEN | openweather | Token for OpenWeatherAPI, only required if you want to use the weather command | +| ZIBOT\_AUTHOR | author | Change the bot's author name (and tag) shown in the info command | +| **CURRENTLY NOT AVAILABLE** | links | Change the links shown in the info command | +| **CURRENTLY NOT AVAILABLE** | TORTOISE\_ORM | Advanced TortoiseORM configuration, you shouldn't touch it if you're not familiar with TortoiseORM | +| ZIBOT\_INTERNAL\_API\_HOST | internalApiHost | The bot's [internal API](https://github.com/ZiRO-Bot/RandomAPI) | + +#### Manual + +> **NOTE**: Python 3.10+ is required to host this bot! - Download this repository by executing `git clone https://github.com/ZiRO-Bot/Z3R0.git` or click "Code" -> "Download ZIP" @@ -52,10 +94,8 @@ More feature coming soon! # Windows py -m pip install poetry - # Linux / MacOS / other Unix-based + # Linux python3 -m pip install poetry - # or (make sure it's python 3.8+) - python -m pip install poetry ``` - After poetry successfully installed, execute this command to install all required dependencies, @@ -73,14 +113,14 @@ More feature coming soon! - Copy and paste (or rename) [`config.py-example`](./config.py-example) to `config.py` - Edit all the necessary config value (`token`, `botMasters`, and `sql`) -- Run the bot by executing this command, `poetry run python .` +- Run the bot by executing this command, `poetry run bot` - If everything is setup properly, the bot should be online! ### Development - Install poetry `pip install poetry` then run `poetry install` - Run `poetry run pre-commit install` -- To run the bot executing this command, `poetry run python .` +- To run the bot executing this command, `poetry run bot` ## Changelog @@ -94,20 +134,28 @@ Moved to [CHANGELOG.md](./CHANGELOG.md) - Channel manager commands - Reaction Role (With buttons... button role?) - Starboard -- Docker thingy for easier way to host the bot -- Replace mute with the new timeout feature from Discord +- Slash and ContextMenu commands (80% complete) +- Button-based (or Modal-based?) bot settings +- Setup Tests using dpytest ### Pending Plan -- i18n using gettext (Learning how gettext works) -- Slash command (Waiting for implementation) +- i18n using gettext + Currently still figuring out how to actually implement gettext +- Modals + Too much limitation at the moment, waiting for model input types ### Scrapped Plan > Plan that unfortunately not possible (atleast for now) -- Music Player (ffmpeg+ytdl vs lavalink?) -- Public/Private commands, allowing other user to use each other's command in a different server. -- Twitch and YouTube notification (Find how to refresh webhook thingy reliably) +- Replace mute with the new timeout feature from Discord + The feature is too limited, maybe I'll add timeout command instead +- Music Player + Not in my top priority, and looking at how aggresive Google is towards music bots... maybe not gonna do it afterall +- Public/Private commands, allowing other user to use each other's command in a different server + Too complicated, might add it after I finally finish the dashboard +- Twitch and YouTube notification + Unreliable most of the time, sometimes return duplicates ## License