aboutsummaryrefslogtreecommitdiff
path: root/src/lib/models/Guild.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-25 12:38:13 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-25 12:38:13 -0400
commit6d27d53623d84127c43d3146619106e540549038 (patch)
treef797712108f295b222da6db803f175a814fa6e28 /src/lib/models/Guild.ts
parent432b602b5416d61d7f11ade478914fc14a8fc971 (diff)
downloadtanzanite-6d27d53623d84127c43d3146619106e540549038.tar.gz
tanzanite-6d27d53623d84127c43d3146619106e540549038.tar.bz2
tanzanite-6d27d53623d84127c43d3146619106e540549038.zip
cleaned up eval command, ported test command, fixed listeners, fixed workflow, changed args typings
Diffstat (limited to 'src/lib/models/Guild.ts')
-rw-r--r--src/lib/models/Guild.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/models/Guild.ts b/src/lib/models/Guild.ts
index f8ebe46..3972259 100644
--- a/src/lib/models/Guild.ts
+++ b/src/lib/models/Guild.ts
@@ -14,6 +14,7 @@ export interface GuildModel {
punishmentEnding: string;
disabledCommands: string[];
lockdownChannels: Snowflake[];
+ autoModPhases: string[]
}
export interface GuildModelCreationAttributes {
@@ -27,6 +28,7 @@ export interface GuildModelCreationAttributes {
punishmentEnding?: string;
disabledCommands?: string[];
lockdownChannels?: Snowflake[];
+ autoModPhases?: string[]
}
export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> implements GuildModel {
@@ -40,6 +42,7 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i
punishmentEnding: string;
disabledCommands: string[];
lockdownChannels: Snowflake[];
+ autoModPhases: string[]
static initModel(sequelize: Sequelize, client: BushClient): void {
Guild.init(
@@ -119,6 +122,17 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i
},
allowNull: false,
defaultValue: '[]'
+ },
+ autoModPhases: {
+ type: DataTypes.TEXT,
+ get: function () {
+ return JSON.parse(this.getDataValue('autoModPhases') as unknown as string);
+ },
+ set: function (val: string[]) {
+ return this.setDataValue('autoModPhases', JSON.stringify(val) as unknown as string[]);
+ },
+ allowNull: false,
+ defaultValue: '[]'
}
},
{ sequelize: sequelize }