diff options
Diffstat (limited to 'src/lib/models/Guild.ts')
-rw-r--r-- | src/lib/models/Guild.ts | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/lib/models/Guild.ts b/src/lib/models/Guild.ts index c4ae53e..480cc60 100644 --- a/src/lib/models/Guild.ts +++ b/src/lib/models/Guild.ts @@ -8,16 +8,24 @@ export interface GuildModel { prefix: string; autoPublishChannels: string[]; blacklistedChannels: Snowflake[]; + welcomeChannel: Snowflake; + muteRole: Snowflake; } -export type GuildModelCreationAttributes = Optional<GuildModel, 'prefix' | 'autoPublishChannels' | 'blacklistedChannels'>; +export type GuildModelCreationAttributes = Optional< + GuildModel, + 'prefix' | 'autoPublishChannels' | 'blacklistedChannels' | 'welcomeChannel' | 'muteRole' +>; export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> implements GuildModel { id: string; prefix: string; autoPublishChannels: string[]; blacklistedChannels: Snowflake[]; - static initModel(seqeulize: Sequelize, client: BushClient): void { + welcomeChannel: Snowflake; + muteRole: Snowflake; + + static initModel(sequelize: Sequelize, client: BushClient): void { Guild.init( { id: { @@ -48,9 +56,17 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i return this.setDataValue('blacklistedChannels', JSON.stringify(val) as unknown as Snowflake[]); }, allowNull: true + }, + welcomeChannel: { + type: DataTypes.STRING, + allowNull: true + }, + muteRole: { + type: DataTypes.STRING, + allowNull: true } }, - { sequelize: seqeulize } + { sequelize: sequelize } ); } } |