Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ITPSoft/discord-bots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

124 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord bots

Spiritual successors to DecimBOT and BasedSchizoBOT, this time developed as a community project in a monorepo.

Individual bots

A schizo impersonation bot.

The funny one.

Spiritual successor of DecimBOT.

An automation bot for Discord.

This bot will be used to automate Šimek&Grossmann's tasks to reduce overhead in the messy script I wrote for him.

Bot configuration and setup

See discord setup to see which roles are needed for everything to work.

See configuration doc for some more notes.

Setup and Environment

We use uv for package and Python version management.

  • uv installation

  • Install dependencies

    • uv sync --frozen --all-groups

    this installs everything needed into the .venv folder

  • Local run

    • šimek
      • uv run src/šimek/main.py
    • grossmann
      • uv run src/grossmann/main.py

Make .env file following .env.sample and fill there the required variables.

Deployment

See development.md for more details beyond this readme.

Docker

Docker images are automatically built and pushed to GitHub Container Registry (GHCR) on every push to main and on version tags.

Pull and run a bot

# Pull the latest image
docker pull ghcr.io/itpsoft/discord-bots:latest

# Run Grossmann (default)
docker run -d --name grossmann --env-file .env ghcr.io/itpsoft/discord-bots:latest

# Run Šimek
docker run -d --name simek --env-file .env -e BOT_NAME=šimek ghcr.io/itpsoft/discord-bots:latest

# Run Krampol
docker run -d --name krampol --env-file .env -e BOT_NAME=krampol ghcr.io/itpsoft/discord-bots:latest

Build and run locally

Using Docker Compose (recommended):

# Build the image
docker compose build

# Run specific bot(s)
docker compose up kouzelnici-grossmann  # or simek, or krampol
docker compose up -d kouzelnici-grossmann  # run in background

# Run all bots
docker compose up -d

# Stop bots
docker compose down

Using Docker directly:

docker build -t discord-bots .
docker run --env-file .env discord-bots

Deploying to Portainer

docker-compose.portainer.yaml contains the configuration for deploying the bot to Portainer, and it's automatically being pulled.

Bare Metal

Currently deployed on bare metal (see historical deployment in src/krampol/systemd files/).

Development

Checks

Run linting and formatting:

uv run poe format-code

or if you activated the .venv

poe format-code

Tests

run

uv run pytest

or if you activated the .venv, just

pytest

See development.md for more information.

Adding packages

See the documentation.

  • Environment locking after updating dependencies
    • uv lock

Troubleshooting

See troubleshooting.md for more information.

About

Our discord bots, for serious automation and unhinged humour.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors