MCPcopy Create free account
hub / github.com/Xchristech2/Zenitsu-Bot / initializeWarningsFile

Function initializeWarningsFile

commands/warn.js:10–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9// Initialize warnings file if it doesn't exist
10function 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
22async function warnCommand(sock, chatId, senderId, mentionedJids, message) {
23 try {

Callers 1

warnCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected