Update profanity-filter.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Deco Vander 2025-07-04 14:03:14 -04:00 committed by GitHub
parent 6be1dc4667
commit 4fdaa4f7da

View file

@ -129,28 +129,7 @@ class ProfanityFilter {
});
}
/**
* Initialize the database table for custom profanity words (legacy sync version)
* @deprecated Use initializeDatabaseAsync() instead
*/
initializeDatabase() {
this.db.serialize(() => {
this.db.run(`CREATE TABLE IF NOT EXISTS profanity_words (
id INTEGER PRIMARY KEY AUTOINCREMENT,
word TEXT NOT NULL UNIQUE,
severity TEXT DEFAULT 'medium',
category TEXT DEFAULT 'custom',
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
created_by TEXT DEFAULT 'admin'
)`, (err) => {
if (err) {
console.error('Error creating profanity_words table:', err);
} else {
console.log('Profanity words table initialized successfully');
}
});
});
}
// Removed the deprecated initializeDatabase method as it is unused and no longer necessary.
/**
* Load custom words from database