From 711974bfbb847decf23f6ac05d0e9faba186f9a1 Mon Sep 17 00:00:00 2001 From: Superkooka Date: Fri, 1 Jul 2022 00:44:00 +0200 Subject: [PATCH] :memo: complementary informations on configuration file --- README.md | 4 ++++ config.exemple.toml | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 8866421..722025d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,10 @@ A POC of a Discord bot using the dropdown capability - Sync configuration with currently send picker. `/role-picker create [picker]`, `/role-picker sync [picker]` (if picker is omitted, resync all?) +## Notes + +- Configuration file format is [TOML](https://toml.io/en/). It is a minimal configuration file format that's easy to read due to obvious semantics. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages. Read `src/config.ts` to see all possibilities. + ## Contributions/License This project has an AGPLv3 license. This project use the `Sheweny` framework with `discord.js` underlying and `BinaryMuse/toml-node` for configuration parsing. diff --git a/config.exemple.toml b/config.exemple.toml index e69de29..13d4c7f 100644 --- a/config.exemple.toml +++ b/config.exemple.toml @@ -0,0 +1,20 @@ +token = "DISCORD TOKEN" + +[roles_picker.PICKER_NAME] + +name = "PICKER NAME" +message = "MESSAGE" +placeholder = "PLACEHOLDER" +multi_select = true + + [[roles_picker.PICKER_NAME.roles]] + name = "OPTION NAME" + description = "DESCRIPTIOM" + role = "ROLE ID" + emoji = "EMOJI" + + [[roles_picker.PICKER_NAME.roles]] + name = "OPTION NAME" + description = "DESCRIPTIOM" + role = "ROLE ID" + emoji = "EMOJI"