| assets | ||
| commands | ||
| config | ||
| dynamicid | ||
| exp | ||
| rolereact | ||
| user | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| config.go | ||
| Dockerfile | ||
| events.go | ||
| go.mod | ||
| go.sum | ||
| justfile | ||
| les-copaings-bot.service | ||
| LICENSE | ||
| main.go | ||
| PRIVACY.md | ||
| README.md | ||
| updates.json | ||
Les Copaings Bot
Bot for the private server Discord "Les Copaings"
Features
- Levels & XP
- Roles management
- Purge command
CopaingXPs
Functions:
xp-message(x;y) = 0.025 x^{1.25}\sqrt{y}+1wherexis the length of the message andyis the diversity of the message (number of different rune)xp-vocal(x)=0.01 x^{1.3}+1wherexis the time spent in vocal (in second)level(x)=0.2 \sqrt{x}wherexis the xplevel^{-1}(x)=25x^2wherexis the level
Installation
There are two ways to install the bot: docker and build.
Docker
- Clone the repository
$ git clone https://git.anhgelus.world/anhgelus/les-copaings-bot.git
- Go into the repository, rename
.env.exampleinto.envand customize it: add your token, change the user and the password of the database - Build the image and start it
Now you have to edit config/config.toml.
You can understand how this config file works below.
After editing this file, you have to start again the bot.
Every time you edit this file, you must restart the bot.
You can stop the compose file with docker compose down
Build
- Clone the repository
$ git clone https://git.anhgelus.world/anhgelus/les-copaings-bot.git
- Install Go 1.24+
- Go into the repository and build the program
$ go build .
- Run the application through bash (or PowerShell if you are on Windows)
Now you have to edit config/config.toml.
You can understand how this config file works below.
After editing this file, you have to start again the bot.
Every time you edit this file, you must restart the bot.
Config
The main config file is config/config.toml.
The default configuration is
debug = false
author = "anhgelus"
[database]
host = "localhost"
user = ""
password = ""
db_name = ""
port = 5432
debugis true if the bot is in debug mode (don't turn it on unless you are modifying the source code)authoris the author's name[database].hostis the host of postgres (using docker, it'spostgres)[database].useris the user of postgres to use (using docker, it must be the same value asPOSTGRES_USERin.env)[database].passwordis the user's password of postgres to use (using docker, it must be the same value asPOSTGRES_PASSWORDin.env)`[database].db_nameis the postgres's database name to use (using docker, it must be the same value asPOSTGRES_DBin.env)[database].portis the port of postgres to use (using docker, it's5432)
Technologies
- Go 1.24
- anhgelus/gokord
License
This project uses Inter, an open font. Check its license here (SIL OPEN FONT LICENSE Version 1.1).