Add new features

This commit is contained in:
Tarrgon
2026-05-19 09:04:59 -04:00
parent 9dc2034700
commit d08b21492a
8 changed files with 310 additions and 109 deletions
+6 -1
View File
@@ -29,7 +29,8 @@ const DB_SCHEMA = `
safe_channels TEXT,
link_skip_channels TEXT,
github_release_channel TEXT,
moderator_channel_id TEXT
moderator_channel_id TEXT,
private_help_channel_id TEXT
);
CREATE TABLE IF NOT EXISTS messages (
@@ -231,6 +232,10 @@ export class Database {
await Database.db.run('UPDATE settings SET github_release_channel = ? WHERE guild_id = ?', id, guildId);
}
static async setPrivateHelpChannel(guildId: string, id: string) {
await Database.db.run('UPDATE settings SET private_help_channel_id = ? WHERE guild_id = ?', id, guildId);
}
// Since "setting" has guaranteed values and is never set by the user, this shouldn't cause any security issues.
// But it does allow me to skip rewriting this a bunch.
static async getGuildArraySetting(setting: GuildArraySetting, guildId: string): Promise<string[]> {