Update README.md
This commit is contained in:
78
README.md
78
README.md
@ -5,63 +5,65 @@
|
||||
</p>
|
||||
<p align="center"><sup>Theme is https://github.com/KillYoy/DiscordNight<sup></p>
|
||||
|
||||
A discord bot that allows you to set date, cron, and interval reminders.
|
||||
A discord bot that allows you to set a date, [cron](https://en.wikipedia.org/wiki/Cron), and interval reminders.
|
||||
|
||||
## Usage
|
||||
|
||||
Type /remind in a Discord server where this bot exists to get a list of slash commands you can use.
|
||||
|
||||
| Environment Variable | Description |
|
||||
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| BOT_TOKEN | [Discord bot token](https://discord.com/developers/applications) |
|
||||
| TIMEZONE | Your time zone. You want the TZ database name. ([List of time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)) |
|
||||
| SQLITE_LOCATION | (Optional) Where to store the database. Defaults to `/jobs.sqlite` |
|
||||
| LOG_LEVEL | Can be CRITICAL, ERROR, WARNING, INFO, or DEBUG. Defaults to `INFO` |
|
||||
|
||||
## Installation
|
||||
|
||||
You have two choices, [install directly on your computer](#Install-directly-on-your-computer) or using [Docker](#docker-compose-with-env-file).
|
||||
|
||||
### Creating a Discord bot token
|
||||
|
||||
- Create a [New Application](https://discord.com/developers/applications).
|
||||
- Create a bot by going to Bot -> Add Bot -> Yes, do it!
|
||||
- You can change Icon and Username here.
|
||||
- Copy the bot token and paste it into the `BOT_TOKEN` environment variable.
|
||||
- Go to the OAuth2 page -> URL Generator
|
||||
- Select the `bot` and `applications.commands` scope.
|
||||
- Select the bot permissions that you want the bot to have. Select `Administrator`. (TODO: Add a list of permissions that are needed)
|
||||
- Copy the generated URL and open it in your browser. You can now invite the bot to your server.
|
||||
|
||||
### Install directly on your computer
|
||||
|
||||
- Install latest version of [git](https://git-scm.com/), [Python](https://www.python.org/) and [Poetry](https://python-poetry.org/docs/#installation).
|
||||
- Download project from GitHub and change directory into it.
|
||||
- Open terminal in the repository folder.
|
||||
- Install latest version of [git](https://git-scm.com/), [Python](https://www.python.org/) and [Poetry](https://python-poetry.org/docs/master/#installation).
|
||||
- Download project from GitHub with git or download the [ZIP](https://github.com/TheLovinator1/discord-reminder-bot/archive/refs/heads/master.zip).
|
||||
- If you want to update the bot, you can run `git pull` in the project folder or download the ZIP again.
|
||||
- Rename .env.example to .env and open it in a text editor.
|
||||
- If you can't see the file extension:
|
||||
- Windows 10: Click the View Tab in File Explorer and click the box next to File name extensions.
|
||||
- Windows 11: Click View -> Show -> File name extensions.
|
||||
- Open a terminal in the repository folder.
|
||||
- Windows 10: Shift + right-click in the folder and select `Open PowerShell window here`.'
|
||||
- Windows 11: Shift + right-click in the folder and select `Open in Windows Terminal`.'
|
||||
- Install requirements:
|
||||
- `poetry install`
|
||||
- Copy .env.example from extras and rename to .env and fill it out.
|
||||
- (You may have to restart your terminal if it can't find the `poetry` command)
|
||||
- Start the bot with:
|
||||
- `poetry run bot`
|
||||
- You can stop the bot with ctrl + c.
|
||||
|
||||
## Docker
|
||||
Note: You will need to run `poetry install` again if poetry.lock has been modified.
|
||||
Note: It can take up to one hour for the slash commands to be visible in the Discord server.
|
||||
|
||||
### Docker
|
||||
|
||||
Docker Hub: [thelovinator/discord-reminder-bot](https://hub.docker.com/r/thelovinator/discord-reminder-bot)
|
||||
|
||||
- Install latest version of [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/install/).
|
||||
- Download project from GitHub and change directory into it.
|
||||
- Copy .env.example from extras and rename to .env and fill it out.
|
||||
- Start the bot with, press ctrl+c to stop it:
|
||||
- Rename .env.example to .env and open it in a text editor.
|
||||
- If you can't see the file extension:
|
||||
- Windows 10: Click the View Tab in File Explorer and click the box next to File name extensions.
|
||||
- Windows 11: Click View -> Show -> File name extensions.
|
||||
- Open a terminal in the extras folder.
|
||||
- Windows 10: Shift + right-click in the folder and select `Open PowerShell window here`
|
||||
- Windows 11: Shift + right-click in the folder and select `Open in Windows Terminal`
|
||||
- Run the Docker Compose file:
|
||||
- `docker-compose up`
|
||||
- Run in the background with:
|
||||
- `docker-compose up -d`
|
||||
|
||||
```yaml
|
||||
version: "3"
|
||||
services:
|
||||
discord-reminder-bot:
|
||||
image: thelovinator/discord-reminder-bot
|
||||
env_file:
|
||||
- .env
|
||||
container_name: discord-reminder-bot
|
||||
environment:
|
||||
- BOT_TOKEN=${BOT_TOKEN}
|
||||
- TIMEZONE=${TIMEZONE}
|
||||
- LOG_LEVEL=${LOG_LEVEL}
|
||||
- SQLITE_LOCATION=/data/jobs.sqlite
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- data_folder:/home/botuser/data/
|
||||
volumes:
|
||||
data_folder:
|
||||
```
|
||||
- You can stop the bot with ctrl + c.
|
||||
- If you want to run the bot in the background, you can run `docker-compose up -d`.
|
||||
|
||||
## Help
|
||||
|
||||
|
Reference in New Issue
Block a user