C-tickets bot
  • C 98%
  • Makefile 1.5%
  • Dockerfile 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Greensky 9333e58ecd
All checks were successful
Create doc, publish it to wiki and send webhook / documentation (push) Successful in 26s
Add wiki data to doxygen workflow
2026-11-05 10:37:33 +01:00
.forgejo Add wiki data to doxygen workflow 2026-11-05 10:37:33 +01:00
src Add adaptation to Dockerfile 2026-11-03 08:10:04 +01:00
.gitignore Ajout fichiers configuration 2026-09-24 11:26:31 +02:00
Dockerfile Add mariadb docker build dependency 2026-11-03 09:44:01 +01:00
makefile Fix Ofast flag name 2026-11-03 09:41:44 +01:00
README.md Add documentation in readme 2026-11-03 09:04:36 +01:00

c-tickets

C-tickets bot

Installation

From source

Get the code : git clone https://git.greensky.tf/Greensky/discord-announcements-publisher.git && cd discord-announcements-publisher

Prerequisiteries

You need to have the Concord library, since it is written in C and is required

Here are the steps to install it :

  1. git clone https://git.greensky.tf/Miroir/concord.git && cd concord (or from the original source (mine is a mirror, it is the same ) : git clone https://github.com/cogmasters/concord && cd concord)
  2. make
  3. sudo make install

If you need to remove concord, run :

sudo rm -rf /usr/local/include/concord /usr/local/lib/libdiscord.a

Setup

Then you need to setup a config.json file. Here is an example :

{
  "logging": {
    "level": "trace",
    "filename": "bot.log",
    "quiet": false,
    "overwrite": true,
    "use_color": true,
    "http": {
      "enable": true,
      "filename": "http.log"
    },
    "disable_modules": ["WEBSOCKETS", "USER_AGENT"]
  },
  "discord": {
    "token": "YOUR-BOT-TOKEN",
    "default_prefix": {
      "enable": false,
      "prefix": "YOUR-COMMANDS-PREFIX"
    }
  }
}

Example from https://git.greensky.tf/Miroir/concord/src/commit/fb0f834d07d65048a6afde177e318fe9659a9494/config.json (I took it from my mirror because forgejo exposes a "Permalink" button to get a permanent url to the said file)

Put it in the same folder as the repository

Environment

You need a .env file, containing the following values :

DATABASE_HOST=ip-of-host
DATABASE_USER=user-of-database
DATABASE_PASSWORD=password-of-user
DATABASE_NAME=name-of-database
GUILD_ID=id-of-your-server
STAFF_ROLE_ID=id-of-role-that-access-tickets

Compiling

You can compile the code by running : make cleanbuild

Launching

Launch it by running ./bin/main.uwu (the default file).

Container

You still need a config.json file, and .env file

You can make the use of a docker-compose.yaml file, such as :

services:
  watchbot:
    image: git.greensky.tf/greensky/c-tickets:latest
    container_name: c-ticketes
    restart: always
    volumes:
      - /absolute/path/to/config.json-file:/var/discord/c-tickets/config.json
      - /absolute/path/to/.env-file:/var/discord/c-tickets/.env

Then start it up : docker compose up -d and you're set