2020-08-12 16:18:42 -04:00
|
|
|
{
|
|
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
|
|
"title": "ModmailConfig",
|
|
|
|
"type": "object",
|
|
|
|
"definitions": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"stringArray": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
2020-08-12 16:24:17 -04:00
|
|
|
"multilineString": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"anyOf": [
|
|
|
|
{
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"$comment": "See definition of multilineString in cfg.js",
|
|
|
|
"multilineString": true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"customBoolean": {
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"type": ["boolean", "string"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"$comment": "See definition of coerceBoolean in cfg.js",
|
|
|
|
"coerceBoolean": true
|
|
|
|
}
|
|
|
|
]
|
2020-08-12 16:18:42 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"properties": {
|
|
|
|
"token": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
2020-08-16 16:53:35 -04:00
|
|
|
"mainServerId": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"$ref": "#/definitions/stringArray"
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
2020-08-16 16:53:35 -04:00
|
|
|
"inboxServerId": {
|
2020-08-12 16:18:42 -04:00
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"logChannelId": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
|
2020-08-16 16:53:35 -04:00
|
|
|
"mainGuildId": {
|
|
|
|
"$comment": "Alias for mainServerId",
|
|
|
|
"$ref": "#/definitions/stringArray"
|
|
|
|
},
|
|
|
|
"mailGuildId": {
|
|
|
|
"$comment": "Alias for inboxServerId",
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
|
2020-08-12 16:18:42 -04:00
|
|
|
"prefix": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "!"
|
|
|
|
},
|
|
|
|
"snippetPrefix": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "!!"
|
|
|
|
},
|
|
|
|
"snippetPrefixAnon": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "!!!"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "Message me for help!"
|
|
|
|
},
|
|
|
|
"responseMessage": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"$ref": "#/definitions/multilineString",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": "Thank you for your message! Our mod team will reply to you here as soon as possible."
|
|
|
|
},
|
|
|
|
"closeMessage": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"$ref": "#/definitions/multilineString"
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
|
|
|
"allowUserClose": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
|
|
|
|
"newThreadCategoryId": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"mentionRole": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "here"
|
|
|
|
},
|
|
|
|
"pingOnBotMention": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": true
|
|
|
|
},
|
|
|
|
"botMentionResponse": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"$ref": "#/definitions/multilineString"
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
"inboxServerPermission": {
|
2020-08-12 20:31:48 -04:00
|
|
|
"$ref": "#/definitions/stringArray",
|
|
|
|
"default": []
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
|
|
|
"alwaysReply": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"alwaysReplyAnon": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"useNicknames": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"ignoreAccidentalThreads": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"threadTimestamps": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"allowMove": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"syncPermissionsOnMove": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": true
|
|
|
|
},
|
|
|
|
"typingProxy": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"typingProxyReverse": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"mentionUserInThreadHeader": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"rolesInThreadHeader": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"allowStaffEdit": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-16 17:52:24 -04:00
|
|
|
"default": true
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
|
|
|
"allowStaffDelete": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-16 17:52:24 -04:00
|
|
|
"default": true
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
"enableGreeting": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"greetingMessage": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"$ref": "#/definitions/multilineString"
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
|
|
|
"greetingAttachment": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"guildGreetings": {
|
|
|
|
"patternProperties": {
|
|
|
|
"^\\d+$": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"$ref": "#/definitions/multilineString"
|
2020-08-12 16:18:42 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {}
|
|
|
|
},
|
|
|
|
|
|
|
|
"requiredAccountAge": {
|
|
|
|
"description": "Required account age to message Modmail, in hours",
|
|
|
|
"type": "number"
|
|
|
|
},
|
|
|
|
"accountAgeDeniedMessage": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"$ref": "#/definitions/multilineString",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": "Your Discord account is not old enough to contact modmail."
|
|
|
|
},
|
|
|
|
|
|
|
|
"requiredTimeOnServer": {
|
|
|
|
"description": "Required time on server to message Modmail, in minutes",
|
|
|
|
"type": "number"
|
|
|
|
},
|
|
|
|
"timeOnServerDeniedMessage": {
|
2020-08-12 16:24:17 -04:00
|
|
|
"$ref": "#/definitions/multilineString",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": "You haven't been a member of the server for long enough to contact modmail."
|
|
|
|
},
|
|
|
|
|
|
|
|
"relaySmallAttachmentsAsAttachments": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
"smallAttachmentLimit": {
|
|
|
|
"description": "Max size of attachment to relay directly. Default is 2MB.",
|
|
|
|
"type": "number",
|
|
|
|
"default": 2097152,
|
|
|
|
"maximum": 8388608,
|
|
|
|
"minimum": 0
|
|
|
|
},
|
|
|
|
|
|
|
|
"attachmentStorage": {
|
|
|
|
"type": "string",
|
2020-08-12 19:36:15 -04:00
|
|
|
"default": "original"
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
|
|
|
"attachmentStorageChannelId": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
|
|
|
|
"categoryAutomation": {
|
2020-08-16 17:55:18 -04:00
|
|
|
"properties": {
|
|
|
|
"newThread": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"newThreadFromGuild": {
|
|
|
|
"type": "object",
|
|
|
|
"patternProperties": {
|
|
|
|
"^.+$": {
|
|
|
|
"type": "string",
|
|
|
|
"pattern": "^\\d+$"
|
|
|
|
}
|
|
|
|
}
|
2020-08-12 16:18:42 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"default": {}
|
|
|
|
},
|
|
|
|
|
|
|
|
"updateNotifications": {
|
2020-08-12 17:03:01 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
2020-08-12 16:18:42 -04:00
|
|
|
"default": true
|
|
|
|
},
|
2020-08-12 20:32:04 -04:00
|
|
|
|
2020-08-12 16:18:42 -04:00
|
|
|
"plugins": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"default": []
|
|
|
|
},
|
|
|
|
|
|
|
|
"commandAliases": {
|
|
|
|
"patternProperties": {
|
|
|
|
"^.+$": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2020-08-16 11:27:51 -04:00
|
|
|
"reactOnSeen": {
|
|
|
|
"$ref": "#/definitions/customBoolean",
|
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
|
|
|
|
"reactOnSeenEmoji": {
|
|
|
|
"type": "string",
|
|
|
|
"default": "\uD83D\uDCE8"
|
|
|
|
},
|
|
|
|
|
2020-08-16 11:36:51 -04:00
|
|
|
"createThreadOnMention": {
|
2020-08-16 11:34:51 -04:00
|
|
|
"$ref": "#/definitions/customBoolean",
|
|
|
|
"default": false
|
|
|
|
},
|
|
|
|
|
2020-08-12 16:18:42 -04:00
|
|
|
"port": {
|
|
|
|
"type": "number",
|
|
|
|
"maximum": 65535,
|
|
|
|
"minimum": 1,
|
|
|
|
"default": 8890
|
|
|
|
},
|
2020-08-12 20:32:04 -04:00
|
|
|
|
2020-08-12 16:18:42 -04:00
|
|
|
"url": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
|
2020-08-12 17:23:59 -04:00
|
|
|
"extraIntents": {
|
|
|
|
"$ref": "#/definitions/stringArray",
|
|
|
|
"default": []
|
2020-08-12 20:31:48 -04:00
|
|
|
},
|
|
|
|
|
|
|
|
"dbType": {
|
|
|
|
"anyOf": [
|
|
|
|
{ "const": "sqlite" },
|
|
|
|
{ "const": "mysql" }
|
|
|
|
],
|
|
|
|
"default": "sqlite"
|
|
|
|
},
|
|
|
|
|
|
|
|
"sqliteOptions": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"filename": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": ["filename"]
|
|
|
|
},
|
|
|
|
|
|
|
|
"mysqlOptions": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"host": {
|
2020-08-13 18:01:40 -04:00
|
|
|
"type": "string",
|
|
|
|
"default": "localhost"
|
2020-08-12 20:31:48 -04:00
|
|
|
},
|
|
|
|
"port": {
|
2020-08-13 18:01:40 -04:00
|
|
|
"type": "number",
|
|
|
|
"default": "3306"
|
2020-08-12 20:31:48 -04:00
|
|
|
},
|
|
|
|
"user": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"password": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"database": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"timezone": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
},
|
2020-08-13 18:01:40 -04:00
|
|
|
"required": ["host", "port", "user", "password", "database"]
|
2020-08-12 16:18:42 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"allOf": [
|
|
|
|
{
|
|
|
|
"$comment": "Base required values",
|
2020-08-16 16:53:35 -04:00
|
|
|
"required": ["token", "mainServerId", "inboxServerId", "logChannelId", "dbType"]
|
2020-08-12 16:18:42 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"$comment": "Make attachmentStorageChannelId required if attachmentStorage is set to 'discord'",
|
|
|
|
"if": {
|
|
|
|
"properties": {
|
|
|
|
"attachmentStorage": {
|
|
|
|
"const": "discord"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"required": ["attachmentStorage"]
|
|
|
|
},
|
|
|
|
"then": {
|
|
|
|
"required": ["attachmentStorageChannelId"]
|
|
|
|
}
|
2020-08-12 20:31:48 -04:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"$comment": "Make sqliteOptions required if dbType is set to 'sqlite'",
|
|
|
|
"if": {
|
|
|
|
"properties": {
|
|
|
|
"dbType": {
|
|
|
|
"const": "sqlite"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"then": {
|
|
|
|
"required": ["sqliteOptions"]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"$comment": "Make mysqlOptions required if dbType is set to 'mysql'",
|
|
|
|
"if": {
|
|
|
|
"properties": {
|
|
|
|
"dbType": {
|
|
|
|
"const": "mysql"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"then": {
|
|
|
|
"required": ["mysqlOptions"]
|
|
|
|
}
|
2020-08-12 16:18:42 -04:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|