You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
3
3
This changelog contains mostly API-Changes and changes for developers.
4
4
5
+
## v3.7.0
6
+
* Rework of configuration localization and loading. All files got migrated.
7
+
* Synced open source-version with close-source-SCNX-version. Please read the detailed changelog on our Discord to learn about new module functionality.
8
+
* feat(economy-system): Added ability to make command-replies public ([#79](https://github.com/SCNetwork/CustomDCBot/pull/79))
* Support for configuration-example-file `content.elementToggle` toggle to improve UX in the SCNX Dashboard ([#76](https://github.com/SCNetwork/CustomDCBot/pull/76))
7
13
* Support for configuration-example-file `content.dependsOn` toggle to improve UX in the SCNX Dashboard ([#76](https://github.com/SCNetwork/CustomDCBot/pull/76))
Copy file name to clipboardExpand all lines: README.md
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,17 +161,14 @@ translationable systems in your module.
161
161
works)
162
162
*`string`: Name of the string
163
163
*`replace` (optional, object): Will replace `%<key>` in the source string by `<value>`
164
-
* Localizations of configuration-files and user-editable strings: You can specify field-fields like `description`
165
-
, `default` and more in multiple languages. The bot / dashboard will choose the correct one automatically.
164
+
* Localizations of configuration-files and user-editable strings: All localizable configuration fields are an object with values keyed based on language codes. Example: `{"description": {"de": "Beschreibung des Feldes", "en": "Description of the field"}`. Each field needs to have at least an English value, as every other language will default back to English.
166
165
167
166
#### module.json
168
167
169
168
Every module has to contain a `module.json` file with the following content:
170
169
171
170
*`name` of the module. Should be the same as the name of your dictionary.
172
-
*`humanReadableName`: English name of the module, shown to users
173
-
*`humanReadableName-<lang>`: Replace `<lang>` with any supported language-code (currently: `de`, `en`); Name of the
174
-
module show to users (fallback order: `humanReadableName-<lang>`, `humanReadableName-en`, `humanReadableName`)
171
+
*`humanReadableName`: [Localized](#localization) name of the module, shown to users
175
172
*`author`
176
173
*`name`: Name of the author
177
174
*`link`: Link to the author
@@ -180,7 +177,7 @@ Every module has to contain a `module.json` file with the following content:
180
177
*`openSourceURL`: URL to the Source-Code of the module licensed under an Open-Source-License (will show
181
178
donation-banners in the SCNX Dashboard (if orgID is set) and qualifies (qualified) developers for financial support
182
179
from the Open-Source-Pool of SCNX)
183
-
*`description`: Short description of the module
180
+
*`description`: [Localized](#localization) short description of the module
184
181
*`cli` (optional): [CLI-File](#cli-files) of your module
185
182
*`commands-dir` (optional): Directory inside your module folder where all
186
183
the [interaction-command-files](#interaction-command) are in
@@ -262,9 +259,8 @@ use `node add-config-element-object.js <Path to example config file> <Path to yo
262
259
An example config file should include the following things:
263
260
264
261
*`filename`: Name of the generated config file
265
-
*`humanname-<lang>`: Name of the file, shown to users (fallback order: `humanname-<lang>`, `humanname-en`, `filename`)
266
-
*`description-<lang>`: Description of the file, shown to users (fallback order: `humanname-<lang>`, `humanname-en`
267
-
, `No description, but you can configure <name> here`)
262
+
*`humanname`: [Localized](#localization) name of the file, shown to users
263
+
*`description`: [Localized](#localization) description of the file, shown to users
268
264
*`configElements` (boolean, default: false): If enabled the configuration-file will be an array of an object of the
269
265
content-fields
270
266
*`commandsWarnings`: This field is used to indicate, that users need to manually set up the permissions for commands in
@@ -276,15 +272,12 @@ An example config file should include the following things:
276
272
*`info`: Key by language; Information about the command; used to explain users what exactly they should do
277
273
*`content`: Array of content fields:
278
274
*`field_name`: Name of the config field
279
-
*`default-<lang>`: Default value of this field (replace `<lang>` with a supported language code),
"en": "Configure the basic features of the bot here",
4
+
"de": "Generelle Konfiguration deines Bots"
5
+
},
6
+
"humanName": {
7
+
"en": "Configuration",
8
+
"de": "Konfiguration"
9
+
},
6
10
"filename": "config.json",
7
11
"content": [
8
12
{
9
-
"field_name": "token",
10
-
"default": "yourtokengoeshere",
11
-
"type": "string",
12
-
"description": "Replace this with your token",
13
-
"hidden": true
14
-
},
15
-
{
16
-
"field_name": "scnxToken",
17
-
"default": "yourtokengoeshere",
18
-
"type": "string",
19
-
"description": "Replace this with your token",
20
-
"hidden": true
13
+
"name": "token",
14
+
"humanName": {},
15
+
"default": {
16
+
"en": "yourtokengoeshere"
17
+
},
18
+
"description": {
19
+
"en": "Replace this with your token"
20
+
},
21
+
"hidden": true,
22
+
"type": "string"
21
23
},
22
24
{
23
-
"field_name": "prefix",
24
-
"humanname-de": "Prefix deines Botes",
25
-
"humanname-en": "Prefix of your bot",
26
-
"default": "!",
27
-
"type": "string",
28
-
"description-en": "Set the prefix of your bot here",
29
-
"description-de": "Dein eigener Prefix - Wir empfehlen ihn einfach bei ! zu belassen."
25
+
"name": "prefix",
26
+
"humanName": {
27
+
"en": "Prefix of your bot",
28
+
"de": "Prefix deines Botes"
29
+
},
30
+
"default": {
31
+
"en": "!"
32
+
},
33
+
"description": {
34
+
"en": "Set the prefix of your bot here",
35
+
"de": "Dein eigener Prefix - Wir empfehlen ihn einfach bei ! zu belassen."
36
+
},
37
+
"type": "string"
30
38
},
31
39
{
32
-
"field_name": "botOperators",
33
-
"default": [],
34
-
"type": "array",
35
-
"content": "string",
40
+
"name": "botOperators",
41
+
"humanName": {},
42
+
"default": {
43
+
"en": []
44
+
},
45
+
"description": {
46
+
"en": "Bot operators can reload the configuration and perform system relevant actions with this bot. Please only add users you really trust (and yourself of course)"
47
+
},
36
48
"hidden": true,
37
-
"description": "Bot operators can reload the configuration and perform system relevant actions with this bot. Please only add users you really trust (and yourself of course)"
49
+
"type": "array",
50
+
"content": "string"
38
51
},
39
52
{
40
-
"field_name": "guildID",
41
-
"default": "489786377261678592",
42
-
"type": "guildID",
53
+
"name": "guildID",
54
+
"humanName": {},
55
+
"default": {
56
+
"en": "489786377261678592"
57
+
},
58
+
"description": {
59
+
"en": "Replace this the id of the guild the bot should work in."
60
+
},
43
61
"hidden": true,
44
-
"description": "Replace this the id of the guild the bot should work in."
62
+
"type": "guildID"
45
63
},
46
64
{
47
-
"field_name": "disableStatus",
48
-
"humanname-en": "Disable Bot-Status",
49
-
"humanname-de": "Bot-Status deaktivieren",
50
-
"default": false,
51
-
"type": "boolean",
52
-
"description-en": "If enabled, the bot won't have a status in discord",
53
-
"description-de": "Wenn aktiviert wird der Bot keinen Status in Discord haben"
65
+
"name": "disableStatus",
66
+
"humanName": {
67
+
"en": "Disable Bot-Status",
68
+
"de": "Bot-Status deaktivieren"
69
+
},
70
+
"default": {
71
+
"en": false
72
+
},
73
+
"description": {
74
+
"en": "If enabled, the bot won't have a status in discord",
75
+
"de": "Wenn aktiviert wird der Bot keinen Status in Discord haben"
76
+
},
77
+
"type": "boolean"
54
78
},
55
79
{
56
-
"field_name": "user_presence",
57
-
"humanname-en": "Bot-Status",
58
-
"default": "You can change this in your config.json btw",
59
-
"type": "string",
60
-
"description-en": "This will show up in Discord as \"Playing <YourValue>\"",
61
-
"description-de": "Das wird in Discord als \"Spielt <Hier der Wert>\" angezeigt"
80
+
"name": "user_presence",
81
+
"humanName": {
82
+
"en": "Bot-Status"
83
+
},
84
+
"default": {
85
+
"en": "Change this in your Bot-Configuration on scnx.app",
86
+
"de": "Ändere das in deiner Bot-Konfiguration auf scnx.app"
87
+
},
88
+
"description": {
89
+
"en": "This will show up in Discord as \"Playing <YourValue>\"",
90
+
"de": "Das wird in Discord als \"Spielt <Hier der Wert>\" angezeigt"
91
+
},
92
+
"type": "string"
62
93
},
63
94
{
64
-
"field_name": "logLevel",
65
-
"humanname-en": "Logging-Level",
66
-
"default": "debug",
95
+
"name": "logLevel",
96
+
"humanName": {
97
+
"en": "Logging-Level"
98
+
},
99
+
"default": {
100
+
"en": "debug"
101
+
},
102
+
"description": {
103
+
"en": "Log-Level of the bot. Leave it as it is, if you don't know what this means",
104
+
"de": "Log-Level des Bots. Belasse es wie es ist, wenn du nicht weißt, was das bedeutet."
105
+
},
67
106
"type": "select",
68
-
"description-en": "Log-Level of the bot. Leave it as it is, if you don't know what this means",
69
-
"description-de": "Log-Level des Bots. Belasse es wie es ist, wenn du nicht weißt, was das bedeutet.",
70
107
"content": [
71
108
"debug",
72
109
"info",
@@ -77,41 +114,66 @@
77
114
]
78
115
},
79
116
{
80
-
"field_name": "timezone",
81
-
"humanname-en": "Timezone",
82
-
"humanname-de": "Zeitzone",
83
-
"default": "Europe/Berlin",
84
-
"type": "timezone",
85
-
"description-en": "Timezone the bot runs in",
86
-
"description-de": "Zeitzone in der der Bot laufen soll"
117
+
"name": "logChannelID",
118
+
"humanName": {
119
+
"en": "Log-Channel",
120
+
"de": "Log-Kanal"
121
+
},
122
+
"default": {
123
+
"en": ""
124
+
},
125
+
"description": {
126
+
"en": "Default log-channel for most modules and used to log relevant information",
127
+
"de": "Standard Log-Kanal für viele Module. Wird außerdem genutzt, um wesentliche Bot-Informationen zu senden"
128
+
},
129
+
"type": "channelID",
130
+
"allowNull": true
87
131
},
88
132
{
89
-
"field_name": "logChannelID",
90
-
"allowNull": true,
91
-
"humanname-en": "Log-Channel",
92
-
"humanname-de": "Log-Kanal",
93
-
"default": "",
94
-
"type": "channelID",
95
-
"description-en": "Default log-channel for most modules and used to log relevant information",
96
-
"description-de": "Standard Log-Kanal für viele Module. Wird außerdem genutzt, um wesentliche Bot-Informationen zu senden"
133
+
"name": "timezone",
134
+
"humanName": {
135
+
"en": "Timezone",
136
+
"de": "Zeitzone"
137
+
},
138
+
"default": {
139
+
"en": "Europe/Berlin"
140
+
},
141
+
"description": {
142
+
"en": "Timezone the bot runs in",
143
+
"de": "Zeitzone in der der Bot laufen soll"
144
+
},
145
+
"type": "timezone"
97
146
},
98
147
{
99
-
"field_name": "disableEveryoneProtection",
100
-
"humanname-en": "Allow @everyone / @here pings",
101
-
"humanname-de": "@everyone und @here Pings erlauben",
102
-
"default": false,
148
+
"name": "disableEveryoneProtection",
149
+
"humanName": {
150
+
"en": "Allow @everyone / @here pings",
151
+
"de": "@everyone und @here Pings erlauben"
152
+
},
153
+
"default": {
154
+
"en": false
155
+
},
156
+
"description": {
157
+
"en": "Allows @everyone and @here pings for messages configurable in the dashboard",
158
+
"de": "Erlaubt @everyone und @here pings in im Dashboard anpassbaren Nachrichten"
159
+
},
103
160
"type": "boolean",
104
-
"description-de": "Erlaubt @everyone und @here pings in im Dashboard anpassbaren Nachrichten",
105
-
"description-en": "Allows @everyone and @here pings for messages configurable in the dashboard"
161
+
"pro": true
106
162
},
107
163
{
108
-
"field_name": "syncCommandGlobally",
109
-
"default": false,
110
-
"type": "boolean",
111
-
"humanname-en": "Sync module commands as global commands",
112
-
"humanname-de": "Speichere Modul-Befehle als Globale-Befehle",
113
-
"description-en": "If enabled, module-commands will be synced to discord as global commands. They will show up on other servers, but won't work. Syncing can take up to 2 hours, so changes may not be reflected immediately.",
114
-
"description-de": "Wenn aktiviert, werden Befehle von Modulen als Globale-Befehle zu Discord gesendet. Sie werden auf anderen Servern angezeigt, werden aber nicht funktionieren. Synchronisierung kann bis zu 2 Stunden dauern."
164
+
"name": "syncCommandGlobally",
165
+
"humanName": {
166
+
"en": "Sync module commands as global commands",
167
+
"de": "Speichere Modul-Befehle als Globale-Befehle"
168
+
},
169
+
"default": {
170
+
"en": false
171
+
},
172
+
"description": {
173
+
"en": "If enabled, module-commands will be synced to discord as global commands. They will show up on other servers, but won't work. Syncing can take up to 2 hours, so changes may not be reflected immediately.",
174
+
"de": "Wenn aktiviert, werden Befehle von Modulen als Globale-Befehle zu Discord gesendet. Sie werden auf anderen Servern angezeigt, werden aber nicht funktionieren. Synchronisierung kann bis zu 2 Stunden dauern."
0 commit comments