From 27744f8d62cf772d77222d1eac662f3156811d33 Mon Sep 17 00:00:00 2001 From: jrmyr Date: Fri, 25 Apr 2025 21:28:05 -0400 Subject: [PATCH] Production configuration. --- .gitignore | 1 - config.js | 252 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 252 insertions(+), 1 deletion(-) create mode 100644 config.js diff --git a/.gitignore b/.gitignore index b37a2d0..3405a38 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ node_modules .env -config.js images/* logs/* pocketbase/* diff --git a/config.js b/config.js new file mode 100644 index 0000000..fb4a5f1 --- /dev/null +++ b/config.js @@ -0,0 +1,252 @@ +import dotenv from 'dotenv'; +dotenv.config(); + +export default { + + clients: [ + { + id: 'IO3', + enabled: true, + owner: 378741522822070272, + + discord: { + appId: process.env.IO3_DISCORD_APPID, + token: process.env.IO3_DISCORD_TOKEN + }, + + logging: { + console: { + enabled: true, + colorize: true, + level: 'silly', + }, + file: { + dateFormat: 'YYYY-MM-DD', + timestampFormat: 'YYYY-MM-DD HH:mm:ss', + combined: { + enabled: true, + level: 'silly', + location: 'logs', + maxSize: '12m', + maxFiles: '30d', + }, + error: { + enabled: true, + level: 'error', + location: 'logs', + maxSize: '12m', + maxFiles: '365d', + } + } + }, + + condimentX: { + dryRun: false, + guildID: '983057544849272883', + debugChannel: '1247179154869325865', + blacklistUsers: [ + '1162531805006680064' // Crow + ], + blacklistRoles: [ + '1173012816228274256', // @Bots + '1209570635085520977', // @Kevin Arby + '1226903935344971786', // @Werebeef + '1250141348040933407' // @RIP + ], + graylistRoles: [ + '1246749335866310656' // @Most Active + ], + whitelistRoles: [ + '1256082910163767378' // @"Crow" + ], + indexRoleID: '1209570635085520977', // Kevin Arby + viralRoleID: '1226903935344971786', // Werebeef + antiIndexRoleID: '1241228932037214358', // Exorcised + antiViralRoleID: '1241230334079795330', // Immunized + firstCycleInterval: 30000, + cycleInterval: 3600000, + cycleIntervalRange: 900000, + incidenceDenominator: 40, + cessationDenominator: 20, + probabilityLimit: 20, + antiViralEffectiveness: 90, + proximityWindow: 120000, + messageHistoryLimit: 50, + ephemeralDelay: 60000, + openAI: true, + openAITriggerOnlyDuringIncident: true, + openAIResponseDenominator: 1, + openAIInstructionsFile: './prompts/kevinarby.txt', + openAITriggers: [ + 'kevin', + 'arby', + 'werebeef' + ], + openAIWebhookID: '1251666161075097640', + openAIWebhookToken: process.env.IO3_CONDIMENTX_WEBHOOK_TOKEN, + openAIToken: process.env.SHARED_OPENAI_API_KEY + }, + + pocketbase: { + url: process.env.SHARED_POCKETBASE_URL, + username: process.env.SHARED_POCKETBASE_USERNAME, + password: process.env.SHARED_POCKETBASE_PASSWORD + }, + + responses: { + apiKey: process.env.SHARED_OPENAI_API_KEY, + defaultModel: 'gpt-4o', + defaultMaxTokens: 1000, + defaultTemperature: 0.7, + systemPromptPath: './prompts/IO3.txt', + conversationExpiry: 30 * 60 * 1000, + minScore: 1.0, + tools: { + webSearch: false, + fileSearch: false, + imageGeneration: true, + }, + imageGeneration: { + defaultModel: 'gpt-image-1', + defaultQuality: 'standard', + imageSavePath: './images' + } + }, + + scorekeeper: { + baseOutput: 1000, + commendationValue: 1.0, + citationValue: 1.2, + decay: 90, + schedule: '0 0 * * 0' + }, + + modules: [ + 'pbUtils', + 'responses', + 'responsesQuery', + 'scorekeeper', + 'scorekeeper-example', + 'condimentX' + ] + + }, + { + id: 'ASOP', + enabled: true, + owner: 378741522822070272, + + discord: { + appId: process.env.ASOP_DISCORD_APPID, + token: process.env.ASOP_DISCORD_TOKEN + }, + + logging: { + console: { + enabled: true, + colorize: true, + level: 'silly', + }, + file: { + dateFormat: 'YYYY-MM-DD', + timestampFormat: 'YYYY-MM-DD HH:mm:ss', + combined: { + enabled: true, + level: 'silly', + location: 'logs', + maxSize: '12m', + maxFiles: '30d', + }, + error: { + enabled: true, + level: 'error', + location: 'logs', + maxSize: '12m', + maxFiles: '365d', + } + } + }, + + pocketbase: { + url: process.env.SHARED_POCKETBASE_URL, + username: process.env.SHARED_POCKETBASE_USERNAME, + password: process.env.SHARED_POCKETBASE_PASSWORD + }, + + modules: [ + 'scExecHangarStatus' + ], + + }, + { + id: 'Smuuush', + enabled: true, + owner: 378741522822070272, + + discord: { + appId: process.env.SMUUUSH_DISCORD_APPID, + token: process.env.SMUUUSH_DISCORD_TOKEN + }, + + logging: { + console: { + enabled: true, + colorize: true, + level: 'silly', + }, + file: { + dateFormat: 'YYYY-MM-DD', + timestampFormat: 'YYYY-MM-DD HH:mm:ss', + combined: { + enabled: true, + level: 'silly', + location: 'logs', + maxSize: '12m', + maxFiles: '30d', + }, + error: { + enabled: true, + level: 'error', + location: 'logs', + maxSize: '12m', + maxFiles: '365d', + } + } + }, + + pocketbase: { + url: process.env.SHARED_POCKETBASE_URL, + username: process.env.SHARED_POCKETBASE_USERNAME, + password: process.env.SHARED_POCKETBASE_PASSWORD + }, + + responses: { + // Minimum score required to use AI responses + minScore: 0, + apiKey: process.env.SHARED_OPENAI_API_KEY, + defaultModel: 'gpt-4o', + defaultMaxTokens: 1000, + defaultTemperature: 0.7, + systemPromptPath: './prompts/Smuuush.txt', + conversationExpiry: 30 * 60 * 1000, + tools: { + webSearch: false, + fileSearch: false, + imageGeneration: true, + }, + imageGeneration: { + defaultModel: 'dall-e-3', + defaultQuality: 'hd', + imageSavePath: './images' + } + }, + + modules: [ + 'pbUtils', + 'responses', + 'responsesQuery' + ], + + } + ] +}