chore: integrate old MemoryPalace files and configure auto-commit

This commit is contained in:
2026-01-26 17:19:26 -05:00
parent 23cb27503e
commit e763f5a9d5
24 changed files with 2032 additions and 34 deletions

View File

@@ -0,0 +1,30 @@
const fs = require('fs');
const path = require('path');
// Load the JSON file
const copypastaFilePath = path.join(
__dirname,
'./tts-copypasta-hall-of-fame.json'
);
let copypastaData = null;
if (fs.existsSync(copypastaFilePath)) {
copypastaData = JSON.parse(fs.readFileSync(copypastaFilePath, 'utf8'));
}
module.exports = async message => {
if (message.content.toLowerCase().includes('cco')) {
// Select a random object from the JSON data
if (!copypastaData) {
await message.reply('I miss Charl');
} else {
const randomIndex = Math.floor(
Math.random() * copypastaData?.messages.length
);
const randomCopypasta = copypastaData.messages[randomIndex];
// Reply with the content key value
await message.reply(randomCopypasta.content);
}
}
};