Skip to content

Instantly share code, notes, and snippets.

@Cenngo
Last active October 18, 2023 09:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Cenngo/d46a881de24823302f66c3c7e2f7b254 to your computer and use it in GitHub Desktop.
Save Cenngo/d46a881de24823302f66c3c7e2f7b254 to your computer and use it in GitHub Desktop.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Discord.NET Json Localization Schema",
"description": "Json schema to be used with the Default Json Localization Manager of D.NET",
"type": [
"object",
"string"
],
"$defs": {
"slash": {
"type": "object",
"properties": {
"name": {
"description": "Localized name of the Slash Command Group/Slash Command/Slash Command Parameter",
"type": "string",
"pattern": "^[\\w-]{1,32}$"
},
"description": {
"description": "Localized description of the Slash Command Group/Slash Command/Slash Command Parameter",
"type": "string",
"minLength": 1,
"maxLength": 100
}
},
"additionalProperties": {
"anyOf": [
{
"$ref": "#/$defs/slash"
},
{
"$ref": "#/$defs/choice"
}
]
},
"required": [
"name",
"description"
]
},
"context": {
"type": "object",
"properties": {
"name": {
"description": "Localized name of the Context Command",
"type": "string",
"minLength": 1,
"maxLength": 32
}
},
"required": [
"name"
],
"additionalProperties": false
},
"choice": {
"type": "object",
"properties": {
"name": {
"description": "Localized name of the Slash Command Parameter Choice",
"type": "string",
"minLength": 1,
"maxLength": 32
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"additionalProperties": {
"anyOf": [
{
"$ref": "#/$defs/slash"
},
{
"$ref": "#/$defs/context"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment