Add an abstract DatabaseHandler class

This commit is contained in:
Oliver Akins 2022-08-14 14:20:41 -06:00
parent 0d10ddb8b5
commit 4045b3d859
No known key found for this signature in database
GPG key ID: 3C2014AF9457AF99

17
src/utils/Database.ts Normal file
View file

@ -0,0 +1,17 @@
export abstract class DatabaseHandler {
public abstract shutdown(): any;
public abstract channelExists(channel: string): Promise<boolean>;
public abstract counterExists(channel: string, counter: string): Promise<boolean>;
public abstract isUserIgnored(channel: string, user: string): Promise<boolean>;
public abstract getMessage(channel: string, counter: string): Promise<string>;
public abstract addChannel(channel: string): Promise<void>;
public abstract addCounter(channel: string, counter: string): Promise<void>;
public abstract changeCount(channel: string, counter: string, delta: number): Promise<number>;
}