diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-08 20:08:16 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-08 20:08:16 -0500 |
commit | e0531157a745ac6178d55cc159b5932fa36ff20f (patch) | |
tree | a8de340d0c48269619e9bfde536932eb08556593 /src/lib/models/StickyRole.ts | |
parent | 0e160ae77477f0986a02746e84158329299f438f (diff) | |
download | tanzanite-e0531157a745ac6178d55cc159b5932fa36ff20f.tar.gz tanzanite-e0531157a745ac6178d55cc159b5932fa36ff20f.tar.bz2 tanzanite-e0531157a745ac6178d55cc159b5932fa36ff20f.zip |
database migrations - use jsonb over text + JSON.parse, refactor bad word & automod - store word in shared db
closes: #53
Diffstat (limited to 'src/lib/models/StickyRole.ts')
-rw-r--r-- | src/lib/models/StickyRole.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/models/StickyRole.ts b/src/lib/models/StickyRole.ts index bbe81ae..4beb4cf 100644 --- a/src/lib/models/StickyRole.ts +++ b/src/lib/models/StickyRole.ts @@ -1,7 +1,6 @@ import { type Snowflake } from 'discord.js'; import { type Sequelize } from 'sequelize'; import { BaseModel } from './BaseModel.js'; -import { jsonArray } from './__helpers.js'; const { DataTypes } = (await import('sequelize')).default; export interface StickyRoleModel { @@ -47,7 +46,7 @@ export class StickyRole extends BaseModel<StickyRoleModel, StickyRoleModelCreati { user: { type: DataTypes.STRING, allowNull: false }, guild: { type: DataTypes.STRING, allowNull: false }, - roles: jsonArray('roles'), + roles: { type: DataTypes.JSONB, allowNull: false, defaultValue: [] }, nickname: { type: DataTypes.STRING, allowNull: true } }, { sequelize } |