{ "$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" }, "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": "local" }, "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" }, "dbDir": { "type": "string" }, "knex": { "type": "object" }, "logDir": { "type": "string", "deprecationMessage": "This option is no longer used" }, "extraIntents": { "$ref": "#/definitions/stringArray", "default": [] } }, "allOf": [ { "$comment": "Base required values", "required": ["token", "mainGuildId", "mailGuildId", "logChannelId"] }, { "$comment": "Make attachmentStorageChannelId required if attachmentStorage is set to 'discord'", "if": { "properties": { "attachmentStorage": { "const": "discord" } }, "required": ["attachmentStorage"] }, "then": { "required": ["attachmentStorageChannelId"] } } ] }