Add an abstract DatabaseHandler class
This commit is contained in:
parent
0d10ddb8b5
commit
4045b3d859
1 changed files with 17 additions and 0 deletions
17
src/utils/Database.ts
Normal file
17
src/utils/Database.ts
Normal 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>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue