diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-04 19:32:39 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-04 19:32:39 -0400 |
commit | b5793611d57a734d75b6a0845c441f33d144a5c0 (patch) | |
tree | 1deb4dc4cd0e1e575b1bc32ed0ae50085c7a3ecf /src/lib/models/ActivePunishment.ts | |
parent | 41c532de2c7786b2bb8ba5d78f092fed3cc6b63a (diff) | |
download | tanzanite-b5793611d57a734d75b6a0845c441f33d144a5c0.tar.gz tanzanite-b5793611d57a734d75b6a0845c441f33d144a5c0.tar.bz2 tanzanite-b5793611d57a734d75b6a0845c441f33d144a5c0.zip |
misc
Diffstat (limited to 'src/lib/models/ActivePunishment.ts')
-rw-r--r-- | src/lib/models/ActivePunishment.ts | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/lib/models/ActivePunishment.ts b/src/lib/models/ActivePunishment.ts index a757b10..fb2e79f 100644 --- a/src/lib/models/ActivePunishment.ts +++ b/src/lib/models/ActivePunishment.ts @@ -29,6 +29,8 @@ export interface ActivePunishmentModelCreationAttributes { modlog: string; } +const NEVER_USED = 'This should never be executed'; + export class ActivePunishment extends BaseModel<ActivePunishmentModel, ActivePunishmentModelCreationAttributes> implements ActivePunishmentModel @@ -37,73 +39,73 @@ export class ActivePunishment * The ID of this punishment (no real use just for a primary key) */ public get id(): string { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } public set id(_: string) { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } /** * The type of punishment. */ public get type(): ActivePunishmentType { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } public set type(_: ActivePunishmentType) { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } /** * The user who is punished. */ public get user(): Snowflake { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } public set user(_: Snowflake) { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } /** * The guild they are punished in. */ public get guild(): Snowflake { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } public set guild(_: Snowflake) { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } /** * Additional info about the punishment if applicable. The channel id for channel blocks and role for punishment roles. */ public get extraInfo(): Snowflake { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } public set extraInfo(_: Snowflake) { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } /** * The date when this punishment expires (optional). */ public get expires(): Date | null { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } public set expires(_: Date | null) { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } /** * The reference to the modlog entry. */ public get modlog(): string { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } public set modlog(_: string) { - throw new Error('This should never be executed'); + throw new Error(NEVER_USED); } - static initModel(sequelize: Sequelize): void { + public static initModel(sequelize: Sequelize): void { ActivePunishment.init( { id: { |