Skip to content

theyellow/cr-discord-bot

Repository files navigation

cr-discord-bot Java Maven Build Quality Gate Status Docker Image CI Docker GHCR - Publish

Discord-Bot in Java for Clash Royal API

This bot is a proof-of-concept distributed-bot and work in progress. Technology is based on discord4j with its special project connect. Springboot and micronaut is used for different parts of this project. Structure of this repository is like:

directory content
common classes used by leader and worker
connect fork of dicord4j-connect, awaiting release after merging of pull-request for approval to be deleted
kubernetes scripts for kubernetes deployment
leader springboot leader application
logs for logs, will be created
connect-middleware micronaut middleware for leader and worker, uses connect
worker springboot worker application

For having some fun this bot plays with Clash Royal API and is inspired by clash-royale-discord-bot written in java/typescript also here on GitHub.

Overview of architecture:

To get it working you need to use

a) GitHub-Actions or other pipelines (GitLab should work as well)

b) build and deploy everything yourself (more difficult)

A 'simple' development-workflow could be:

  • push to GitHub
  • automatically GitHub starts pipeline which will build docker images and publish it to github docker registry.
  • use your own kubernetes-cluster to deploy images with scripts (examples in kubernetes-directory)

Credits to discord4j for the libraries and examples and clash-royal-discord-bot for ideas. Also credits to developer-teams of official Clash Royale API and Discord.