-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjson-config-ref.json
More file actions
400 lines (400 loc) · 14.8 KB
/
json-config-ref.json
File metadata and controls
400 lines (400 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Ballsdex configuration",
"description": "Core settings for the Ballsdex Discord bot",
"type": "object",
"required": [
"discord-token",
"text-prefix",
"about",
"collectible-name",
"bot-name",
"players-group-cog-name",
"admin-command",
"prometheus",
"owners"
],
"additionalProperties": false,
"properties": {
"discord-token": {
"description": "The Discord bot token",
"type": "string",
"minLength": 70,
"maxLength": 72
},
"text-prefix": {
"description": "The prefix for old text commands",
"type": "string",
"minLength": 1,
"default": "b."
},
"about": {
"type": "object",
"description": "Information used in /about",
"additionalProperties": false,
"properties": {
"description": {
"type": "string",
"description": "Defines the beginning of the description of /about. The other parts are automatically generated"
},
"github-link": {
"type": "string",
"description": "A GitHub repository for source code, if using a fork",
"format": "uri"
},
"discord-invite": {
"type": "string",
"description": "A Discord server to link for support",
"pattern": "^https?://(discord.gg|discord(app)?.com/invite)/[a-zA-Z0-9]+$"
},
"terms-of-service": {
"type": "string",
"description": "A link to the terms of service",
"format": "uri"
},
"privacy-policy": {
"type": "string",
"description": "A link to the privacy policy",
"format": "uri"
}
},
"required": [
"description",
"github-link",
"discord-invite",
"terms-of-service",
"privacy-policy"
]
},
"collectible-name": {
"type": "string",
"description": "The name of the collectible, used everywhere except command descriptions.",
"default": "countryball"
},
"max-favorites": {
"type": "integer",
"default": 50,
"description": "Maximum number of favorite countryballs allowed per player",
"minimum": 0
},
"favorited-collectible-emoji": {
"type": "string",
"default": "❤️",
"description": "The emoji used to represent a favorited countryball"
},
"max-attack-bonus": {
"type": "integer",
"description": "The biggest/smallest attack bonus that a spawned countryball can have.",
"default": 20
},
"max-health-bonus": {
"type": "integer",
"description": "The biggest/smallest health bonus that a spawned countryball can have.",
"default": 20
},
"plural-collectible-name": {
"type": "string",
"description": "The plural name of the collectible, used everywhere except command descriptions.",
"default": "countryballs"
},
"show-rarity": {
"type": "boolean",
"description": "Enables the display of rarity in the top right hand corner of a card. Should not be used with economies.",
"default": false
},
"bot-name": {
"type": "string",
"description": "The name of the bot, used in places such as the /completion command",
"default": "BallsDex"
},
"players-group-cog-name": {
"type": "string",
"description": "Name of the slash command managing the collectibles (list, info, completion...). Do not add a leading slash!",
"default": "balls"
},
"admin-command": {
"type": "object",
"description": "Manages access to the admin command",
"additionalProperties": false,
"properties": {
"guild-ids": {
"type": [
"array",
"null"
],
"description": "IDs of guilds with the /admin command registered",
"items": {
"$ref": "#/$defs/discord-id"
}
},
"root-role-ids": {
"type": [
"array",
"null"
],
"description": "IDs of roles with full access to /admin",
"items": {
"$ref": "#/$defs/discord-id"
}
},
"admin-role-ids": {
"type": [
"array",
"null"
],
"description": "IDs of roles with partial access to /admin: blacklist control and guilds ownership inspection",
"items": {
"$ref": "#/$defs/discord-id"
}
},
"admin-channel-ids": {
"type": [
"array",
"null"
],
"description": "IDs of channels in which privacy settings can be bypassed. Empty means any channel is allowed.",
"items": {
"$ref": "#/$defs/discord-id"
}
}
},
"required": [
"guild-ids",
"root-role-ids",
"admin-role-ids"
]
},
"prometheus": {
"type": "object",
"description": "Prometheus metrics configuration",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether to enable Prometheus metrics server",
"default": false
},
"host": {
"type": "string",
"description": "Host to bind to",
"default": "0.0.0.0"
},
"port": {
"type": "integer",
"description": "Port to bind to",
"default": 15260
}
}
},
"log-channel": {
"type": [
"integer",
"null"
],
"description": "ID of the channel to log events to",
"$ref": "#/$defs/discord-id"
},
"owners": {
"type": "object",
"description": "Manages ownership of the bot",
"additionalProperties": false,
"properties": {
"team-members-are-owners": {
"type": "boolean",
"description": "Whether to consider Discord developer team members as owners",
"default": false
},
"co-owners": {
"type": [
"array",
"null"
],
"description": "IDs of users with ownership",
"items": {
"$ref": "#/$defs/discord-id"
}
},
"hide-owner": {
"type": "boolean",
"default": false,
"description": "Hides the owner name in /about"
}
}
},
"spawn-chance-range": {
"type": "array",
"description": "Spawn chance range. Minimum and maximum values in minutes for the spawn manager to determine when the next countryball should spawn (before taking into account activity)",
"prefixItems": [
{
"type": "integer",
"minimum": 0
},
{
"type": "integer",
"minimum": 0
}
],
"items": false
},
"spawn-manager": {
"$ref": "#/$defs/python-path",
"description": "Override the default spawn manager with your own implementation. Must be an importable Python path to a SpawnManager class.",
"default": "ballsdex.packages.countryballs.spawn.SpawnManager"
},
"packages": {
"type": "array",
"description": "List of packages to load on start. Must be importable Python paths to a discord.py package.",
"items": {
"$ref": "#/$defs/python-path"
}
},
"admin-panel": {
"type": "object",
"description": "Django admin panel settings",
"additionalProperties": false,
"properties": {
"client-id": {
"$ref": "#/$defs/discord-id",
"type": [
"integer",
"null"
],
"description": "To enable Discord OAuth2, fill the ID of your Discord application here."
},
"client-secret": {
"type": [
"string",
"null"
],
"description": "To enable Discord OAuth2, fill the OAuth2 secret of your Discord application here.",
"pattern": "^[a-zA-Z0-9-_]{32}$"
},
"webhook-url": {
"type": [
"string",
"null"
],
"description": "Link to a Discord webhook for admin panel notifications",
"pattern": "^https://discord.com/api/webhooks/[0-9]{17,22}/[a-zA-Z0-9-_]{68}$"
},
"url": {
"type": [
"string",
"null"
],
"description": "URL to your admin panel. If null, disables all hyperlinks to the admin panel in the bot.",
"$ref": "#/$defs/url"
}
}
},
"sentry": {
"type": "object",
"description": "Configures sentry for reporting logging events",
"additionalProperties": false,
"properties": {
"dsn": {
"type": [
"string",
"null"
],
"description": "URL to your sentry DSN (Data Source Name)"
},
"environment": {
"type": [
"string",
"null"
],
"description": "An identifier to use for the environment the bot runs in.",
"default": "production"
}
}
},
"catch": {
"type": "object",
"description": "Customize the messages sent when attempting to catch a countryball",
"additionalProperties": false,
"properties": {
"catch_button_label": {
"type": "string",
"description": "The label displayed on the catch button",
"default": "Catch me!"
},
"caught_msgs": {
"type": "array",
"description": "A list of messages to use when a countryball is caught. ID and stats are appended to these.\n{user}: Mention of interacting user\n{collectible}: Collectible name\n{collectibles}: Plural collectible name",
"default": [
"{user} You caught **{ball}**!"
],
"items": {
"type": "string"
}
},
"wrong_msgs": {
"type": "array",
"description": "A list of messages to use when a wrong name was attempted.\n{user}: Mention of interacting user\n{wrong}: The name attempted\n{collectible}: Collectible name\n{collectibles}: Plural collectible name",
"default": [
"{user} Wrong name!"
],
"items": {
"type": "string"
}
},
"spawn_msgs": {
"type": "array",
"description": "A list of messages to use when spawning an item.\n{collectible}: Collectible name\n{collectibles}: Plural collectible name",
"default": [
"A wild {collectible} appeared!"
],
"items": {
"type": "string"
}
},
"slow_msgs": {
"type": "array",
"description": "A list of messages to use when a user attempted to catch a ball, but someone else caught it before.\n{user}: Mention of interacting user\n{collectible}: Collectible name\n{collectibles}: Plural collectible name",
"default": [
"{user} Sorry, this {collectible} was caught already!"
],
"items": {
"type": "string"
}
}
}
},
"extra-tortoise-models": {
"type": [
"array",
"null"
],
"description": "Extra Python paths to register for Tortoise models",
"items": {
"$ref": "#/$defs/python-path"
}
},
"extra-django-apps": {
"type": [
"array",
"null"
],
"description": "Extra Django apps to register",
"items": {
"$ref": "#/$defs/python-path"
}
}
},
"$defs": {
"python-path": {
"type": "string",
"pattern": "^[a-zA-Z_][\\.a-zA-Z0-9_]+$"
},
"discord-id": {
"type": "integer",
"minimum": 10000000000000000,
"maximum": 99999999999999999999
},
"url": {
"type": "string",
"pattern": "^https?://[^\n\r\t\\?/]+$"
}
}
}