Try schemas

This commit is contained in:
MSWS
2023-04-12 15:49:10 -07:00
parent efa90e9591
commit 0f64eec7a2
2 changed files with 192 additions and 1 deletions

View File

@@ -1 +1,20 @@
Abandon all hope, ye who enter here.
# DSBot
### A modular Discord DS Bot
## Setup
1. `git clone git@ssh.gitlab.edgegamers.io:discord/ds-bot.git`
2. `npm install`
3. `npm run start`
## Features
### DS Reaction-Roles
Currently only implemented color roles.
Allows users to react to a pre-configured message to receive a role.
### DS Voice Channels
Grants Dedicated Supporters granular control over their voice channels.
## Configuration
All configuration is done through the guild's specific JSON file. Config files are under `/configs/guilds/{guildId}.json`
Each Config is linked to a ConfigEntry.

View File

@@ -0,0 +1,172 @@
{
"type": "object",
"properties": {
"commands": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
}
},
"required": [
"name",
"enabled"
]
}
},
"react-roles": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"unique": {
"type": "boolean"
},
"channel": {
"type": "string"
},
"embedData": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"color": {
"type": "integer"
}
},
"required": [
"title",
"description",
"color"
]
},
"roles": {
"type": "array",
"items": {
"type": "string"
}
},
"emotes": {
"type": "array",
"items": {
"type": "string"
}
},
"embedId": {
"type": "string"
}
},
"required": [
"enabled",
"unique",
"channel",
"embedData",
"roles",
"emotes",
"embedId"
]
},
"ds-voice": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"joinChannel": {
"type": "string"
},
"maxSizes": {
"type": "array",
"items": {
"type": "integer"
}
},
"maxListSizes": {
"type": "array",
"items": {
"type": "integer"
}
},
"tierRequirements": {
"type": "object",
"properties": {
"create": {
"$ref": "#/definitions/DSTier"
},
"join": {
"$ref": "#/definitions/DSTier"
},
"rename": {
"$ref": "#/definitions/DSTier"
},
"lock": {
"$ref": "#/definitions/DSTier"
},
"list": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/DSTier"
}
}
},
"required": [
"create",
"join",
"rename",
"lock",
"list"
]
}
},
"required": [
"enabled",
"joinChannel",
"maxSizes",
"maxListSizes",
"tierRequirements"
]
},
"permissions": {
"type": "object",
"properties": {
"leRoles": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"leRoles"
]
}
},
"required": [
"commands",
"react-roles",
"ds-voice",
"permissions"
],
"definitions": {
"DSTier": {
"type": "string",
"enum": [
"None",
"Silver",
"Gold",
"Platinum",
"Royal"
]
}
}
}