diff --git a/src/config.js b/src/config.js index 856a514..4d7cd86 100644 --- a/src/config.js +++ b/src/config.js @@ -69,6 +69,7 @@ const defaultConfig = { "accountAgeDeniedMessage": "Your Discord account is not old enough to contact modmail.", "relaySmallAttachmentsAsAttachments": false, + "smallAttachmentLimit": 1024 * 1024 * 2, "port": 8890, "url": null, @@ -117,6 +118,11 @@ for (const opt of required) { } } +if (finalConfig.smallAttachmentLimit > 1024 * 1024 * 8) { + finalConfig.smallAttachmentLimit = 1024 * 1024 * 8; + console.log('[WARN] smallAttachmentLimit capped at 8MB'); +} + // Make sure mainGuildId is internally always an array if (! Array.isArray(finalConfig['mainGuildId'])) { finalConfig['mainGuildId'] = [finalConfig['mainGuildId']];