From 4045b3d8595fe692a9e39a60f826da25de343d53 Mon Sep 17 00:00:00 2001 From: Oliver Akins Date: Sun, 14 Aug 2022 14:20:41 -0600 Subject: [PATCH] Add an abstract DatabaseHandler class --- src/utils/Database.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/utils/Database.ts diff --git a/src/utils/Database.ts b/src/utils/Database.ts new file mode 100644 index 0000000..b95dc2f --- /dev/null +++ b/src/utils/Database.ts @@ -0,0 +1,17 @@ +export abstract class DatabaseHandler { + public abstract shutdown(): any; + + public abstract channelExists(channel: string): Promise; + + public abstract counterExists(channel: string, counter: string): Promise; + + public abstract isUserIgnored(channel: string, user: string): Promise; + + public abstract getMessage(channel: string, counter: string): Promise; + + public abstract addChannel(channel: string): Promise; + + public abstract addCounter(channel: string, counter: string): Promise; + + public abstract changeCount(channel: string, counter: string, delta: number): Promise; +} \ No newline at end of file