aboutsummaryrefslogtreecommitdiff
path: root/src/lib/models/Global.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-04 19:32:39 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-04 19:32:39 -0400
commitb5793611d57a734d75b6a0845c441f33d144a5c0 (patch)
tree1deb4dc4cd0e1e575b1bc32ed0ae50085c7a3ecf /src/lib/models/Global.ts
parent41c532de2c7786b2bb8ba5d78f092fed3cc6b63a (diff)
downloadtanzanite-b5793611d57a734d75b6a0845c441f33d144a5c0.tar.gz
tanzanite-b5793611d57a734d75b6a0845c441f33d144a5c0.tar.bz2
tanzanite-b5793611d57a734d75b6a0845c441f33d144a5c0.zip
misc
Diffstat (limited to 'src/lib/models/Global.ts')
-rw-r--r--src/lib/models/Global.ts28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/lib/models/Global.ts b/src/lib/models/Global.ts
index a685d91..36c72d8 100644
--- a/src/lib/models/Global.ts
+++ b/src/lib/models/Global.ts
@@ -20,68 +20,70 @@ export interface GlobalModelCreationAttributes {
blacklistedChannels?: Snowflake[];
}
+const NEVER_USED = 'This should never be executed';
+
export class Global extends BaseModel<GlobalModel, GlobalModelCreationAttributes> implements GlobalModel {
/**
* The bot's environment.
*/
public get environment(): 'production' | 'development' | 'beta' {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
public set environment(_: 'production' | 'development' | 'beta') {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
/**
* Trusted users.
*/
public get superUsers(): Snowflake[] {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
public set superUsers(_: Snowflake[]) {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
/**
* Globally disabled commands.
*/
public get disabledCommands(): string[] {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
public set disabledCommands(_: string[]) {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
/**
* Globally blacklisted users.
*/
public get blacklistedUsers(): Snowflake[] {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
public set blacklistedUsers(_: Snowflake[]) {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
/**
* Guilds blacklisted from using the bot.
*/
public get blacklistedGuilds(): Snowflake[] {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
public set blacklistedGuilds(_: Snowflake[]) {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
/**
* Channels where the bot is prevented from running.
*/
public get blacklistedChannels(): Snowflake[] {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
public set blacklistedChannels(_: Snowflake[]) {
- throw new Error('This should never be executed');
+ throw new Error(NEVER_USED);
}
- static initModel(sequelize: Sequelize): void {
+ public static initModel(sequelize: Sequelize): void {
Global.init(
{
environment: {