janumiko / uj-discord-bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🆗Bot Build

Installation

You need to have Docker software installed.

Clone the repository to your machine

git clone https://github.com/OK-bot-team/uj-discord-bot.git

or using ssh

git clone git@github.com:OK-bot-team/uj-discord-bot.git

Create necessary environment variables in repository, for example with .env file. Example file:

API_URL=<API_BACKED_URL>
DISCORD_TOKEN=<YOUR-DISCORD-BOT-TOKEN>

Build docker image in repository

docker build -t <your-image-name> <path-to-respository>

You can run the bot with your image name

docker run <your-image-name>

Example:

docker build -t ok-bot .
docker run -d ok-bot

Testing ✔️

Testing is done with pytest framework.

to run pytest tests:

pytest <path-to-repository>

to add more tests, create them in tests directory in compliance to pytest documentation.

About


Languages

Language:Python 98.5%Language:Dockerfile 1.5%