pockybot
Version:
Spark bot that handles team recognition
26 lines (25 loc) • 1.17 kB
TypeScript
import QueryHandler from './query-handler-interface';
import { ConfigRow, RolesRow, StringConfigRow, Role } from '../../models/database';
import { DbConfig as DbConfigInterface } from './db-interfaces';
export default class DbConfig implements DbConfigInterface {
private readonly sqlGetConfig;
private readonly sqlGetStringConfig;
private readonly sqlGetRoles;
private readonly sqlSetConfig;
private readonly sqlSetStringConfig;
private readonly sqlSetRoles;
private readonly sqlDeleteConfig;
private readonly sqlDeleteRoles;
private readonly sqlDeleteStringConfig;
private queryHandler;
constructor(queryHandler: QueryHandler);
getRoles(): Promise<RolesRow[]>;
getConfig(): Promise<ConfigRow[]>;
getStringConfig(): Promise<StringConfigRow[]>;
setRoles(userid: string, role: Role): Promise<void>;
setConfig(config: string, value: number): Promise<void>;
setStringConfig(config: string, value: string): Promise<void>;
deleteRole(userid: string, role: Role): Promise<void>;
deleteConfig(config: string): Promise<void>;
deleteStringConfig(config: string, value: string): Promise<void>;
}