()
| 8 | |
| 9 | // Initialize warnings file if it doesn't exist |
| 10 | function initializeWarningsFile() { |
| 11 | // Create database directory if it doesn't exist |
| 12 | if (!fs.existsSync(databaseDir)) { |
| 13 | fs.mkdirSync(databaseDir, { recursive: true }); |
| 14 | } |
| 15 | |
| 16 | // Create warnings.json if it doesn't exist |
| 17 | if (!fs.existsSync(warningsPath)) { |
| 18 | fs.writeFileSync(warningsPath, JSON.stringify({}), 'utf8'); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | async function warnCommand(sock, chatId, senderId, mentionedJids, message) { |
| 23 | try { |