{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "ModmailConfig", "type": "object", "definitions": { "stringArray": { "type": "array", "items": { "type": "string" } }, "multilineString": { "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 } ] } }, "properties": { "token": { "type": "string" }, "mainGuildId": { "$ref": "#/definitions/stringArray" }, "mailGuildId": { "type": "string" }, "logChannelId": { "type": "string" }, "prefix": { "type": "string", "default": "!" }, "snippetPrefix": { "type": "string", "default": "!!" }, "snippetPrefixAnon": { "type": "string", "default": "!!!" }, "status": { "type": "string", "default": "Message me for help!" }, "responseMessage": { "$ref": "#/definitions/multilineString", "default": "Thank you for your message! Our mod team will reply to you here as soon as possible." }, "closeMessage": { "$ref": "#/definitions/multilineString" }, "allowUserClose": { "$ref": "#/definitions/customBoolean", "default": false }, "newThreadCategoryId": { "type": "string" }, "mentionRole": { "type": "string", "default": "here" }, "pingOnBotMention": { "$ref": "#/definitions/customBoolean", "default": true }, "botMentionResponse": { "$ref": "#/definitions/multilineString" }, "inboxServerPermission": { "$ref": "#/definitions/stringArray", "default": [] }, "alwaysReply": { "$ref": "#/definitions/customBoolean", "default": false }, "alwaysReplyAnon": { "$ref": "#/definitions/customBoolean", "default": false }, "useNicknames": { "$ref": "#/definitions/customBoolean", "default": false }, "ignoreAccidentalThreads": { "$ref": "#/definitions/customBoolean", "default": false }, "threadTimestamps": { "$ref": "#/definitions/customBoolean", "default": false }, "allowMove": { "$ref": "#/definitions/customBoolean", "default": false }, "syncPermissionsOnMove": { "$ref": "#/definitions/customBoolean", "default": true }, "typingProxy": { "$ref": "#/definitions/customBoolean", "default": false }, "typingProxyReverse": { "$ref": "#/definitions/customBoolean", "default": false }, "mentionUserInThreadHeader": { "$ref": "#/definitions/customBoolean", "default": false }, "rolesInThreadHeader": { "$ref": "#/definitions/customBoolean", "default": false }, "allowStaffEdit": { "$ref": "#/definitions/customBoolean", "default": false }, "allowStaffDelete": { "$ref": "#/definitions/customBoolean", "default": false }, "enableGreeting": { "$ref": "#/definitions/customBoolean", "default": false }, "greetingMessage": { "$ref": "#/definitions/multilineString" }, "greetingAttachment": { "type": "string" }, "guildGreetings": { "patternProperties": { "^\\d+$": { "$ref": "#/definitions/multilineString" } }, "default": {} }, "requiredAccountAge": { "description": "Required account age to message Modmail, in hours", "type": "number" }, "accountAgeDeniedMessage": { "$ref": "#/definitions/multilineString", "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": { "$ref": "#/definitions/multilineString", "default": "You haven't been a member of the server for long enough to contact modmail." }, "relaySmallAttachmentsAsAttachments": { "$ref": "#/definitions/customBoolean", "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", "default": "original" }, "attachmentStorageChannelId": { "type": "string" }, "categoryAutomation": { "patternProperties": { "^.+$": { "type": "string", "pattern": "^\\d+$" } }, "default": {} }, "updateNotifications": { "$ref": "#/definitions/customBoolean", "default": true }, "plugins": { "type": "array", "items": { "type": "string" }, "default": [] }, "commandAliases": { "patternProperties": { "^.+$": { "type": "string" } } }, "port": { "type": "number", "maximum": 65535, "minimum": 1, "default": 8890 }, "url": { "type": "string" }, "extraIntents": { "$ref": "#/definitions/stringArray", "default": [] }, "dbType": { "anyOf": [ { "const": "sqlite" }, { "const": "mysql" } ], "default": "sqlite" }, "sqliteOptions": { "type": "object", "properties": { "filename": { "type": "string" } }, "required": ["filename"] }, "mysqlOptions": { "type": "object", "properties": { "host": { "type": "string" }, "port": { "type": "number" }, "user": { "type": "string" }, "password": { "type": "string" }, "database": { "type": "string" }, "timezone": { "type": "string" } }, "required": ["user", "password", "database"] } }, "allOf": [ { "$comment": "Base required values", "required": ["token", "mainGuildId", "mailGuildId", "logChannelId", "dbType"] }, { "$comment": "Make attachmentStorageChannelId required if attachmentStorage is set to 'discord'", "if": { "properties": { "attachmentStorage": { "const": "discord" } }, "required": ["attachmentStorage"] }, "then": { "required": ["attachmentStorageChannelId"] } }, { "$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"] } } ] }