diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-04 15:25:32 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-04 15:25:32 -0400 |
commit | cf564dbb6435886f97e2e9870363144386af368d (patch) | |
tree | d535cd73f24a145ca9d7ce1a0e1174cba0d38b31 /src/lib/models | |
parent | 34f0d1d3ff3e2a90193c9a4d4de29d8335160d6a (diff) | |
download | tanzanite-cf564dbb6435886f97e2e9870363144386af368d.tar.gz tanzanite-cf564dbb6435886f97e2e9870363144386af368d.tar.bz2 tanzanite-cf564dbb6435886f97e2e9870363144386af368d.zip |
mute command
Diffstat (limited to 'src/lib/models')
-rw-r--r-- | src/lib/models/Ban.ts | 10 | ||||
-rw-r--r-- | src/lib/models/Guild.ts | 8 | ||||
-rw-r--r-- | src/lib/models/ModLog.ts | 11 | ||||
-rw-r--r-- | src/lib/models/Mute.ts | 10 | ||||
-rw-r--r-- | src/lib/models/PunishmentRole.ts | 10 |
5 files changed, 14 insertions, 35 deletions
diff --git a/src/lib/models/Ban.ts b/src/lib/models/Ban.ts index f4463b8..54ca6ae 100644 --- a/src/lib/models/Ban.ts +++ b/src/lib/models/Ban.ts @@ -7,7 +7,6 @@ export interface BanModel { id: string; user: string; guild: string; - reason: string; expires: Date; modlog: string; } @@ -15,7 +14,6 @@ export interface BanModelCreationAttributes { id?: string; user: string; guild: string; - reason?: string; expires?: Date; modlog: string; } @@ -34,10 +32,6 @@ export class Ban extends BaseModel<BanModel, BanModelCreationAttributes> impleme */ guild: Snowflake; /** - * The reason they are banned (optional) - */ - reason: string | null; - /** * The date at which this ban expires and should be unbanned (optional) */ expires: Date | null; @@ -71,10 +65,6 @@ export class Ban extends BaseModel<BanModel, BanModelCreationAttributes> impleme type: DataTypes.DATE, allowNull: true }, - reason: { - type: DataTypes.STRING, - allowNull: true - }, modlog: { type: DataTypes.STRING, allowNull: false, diff --git a/src/lib/models/Guild.ts b/src/lib/models/Guild.ts index 303335b..0fc3413 100644 --- a/src/lib/models/Guild.ts +++ b/src/lib/models/Guild.ts @@ -10,11 +10,12 @@ export interface GuildModel { blacklistedChannels: Snowflake[]; welcomeChannel: Snowflake; muteRole: Snowflake; + punishmentEnding: string; } export type GuildModelCreationAttributes = Optional< GuildModel, - 'prefix' | 'autoPublishChannels' | 'blacklistedChannels' | 'welcomeChannel' | 'muteRole' + 'prefix' | 'autoPublishChannels' | 'blacklistedChannels' | 'welcomeChannel' | 'muteRole' | 'punishmentEnding' >; export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> implements GuildModel { @@ -24,6 +25,7 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i blacklistedChannels: Snowflake[]; welcomeChannel: Snowflake; muteRole: Snowflake; + punishmentEnding: string; static initModel(sequelize: Sequelize, client: BushClient): void { Guild.init( @@ -64,6 +66,10 @@ export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> i muteRole: { type: DataTypes.STRING, allowNull: true + }, + punishmentEnding: { + type: DataTypes.TEXT, + allowNull: true } }, { sequelize: sequelize } diff --git a/src/lib/models/ModLog.ts b/src/lib/models/ModLog.ts index 1d850d9..6261794 100644 --- a/src/lib/models/ModLog.ts +++ b/src/lib/models/ModLog.ts @@ -4,14 +4,17 @@ import { v4 as uuidv4 } from 'uuid'; import { BaseModel } from './BaseModel'; export enum ModLogType { - BAN = 'BAN', + PERM_BAN = 'PERM_BAN', TEMP_BAN = 'TEMP_BAN', + UNBAN = 'UNBAN', KICK = 'KICK', - MUTE = 'MUTE', + PERM_MUTE = 'PERM_MUTE', TEMP_MUTE = 'TEMP_MUTE', + UNMUTE = 'UNMUTE', WARN = 'WARN', - PUNISHMENT_ROLE = 'PUNISHMENT_ROLE', - TEMP_PUNISHMENT_ROLE = 'TEMP_PUNISHMENT_ROLE' + PERM_PUNISHMENT_ROLE = 'PERM_PUNISHMENT_ROLE', + TEMP_PUNISHMENT_ROLE = 'TEMP_PUNISHMENT_ROLE', + REMOVE_PUNISHMENT_ROLE = 'REMOVE_PUNISHMENT_ROLE' } export interface ModLogModel { diff --git a/src/lib/models/Mute.ts b/src/lib/models/Mute.ts index 273d5b1..71a32e3 100644 --- a/src/lib/models/Mute.ts +++ b/src/lib/models/Mute.ts @@ -7,7 +7,6 @@ export interface MuteModel { id: string; user: string; guild: string; - reason: string; expires: Date; modlog: string; } @@ -15,7 +14,6 @@ export interface MuteModelCreationAttributes { id?: string; user: string; guild: string; - reason?: string; expires?: Date; modlog: string; } @@ -34,10 +32,6 @@ export class Mute extends BaseModel<MuteModel, MuteModelCreationAttributes> impl */ guild: Snowflake; /** - * The reason they are muted (optional) - */ - reason: string | null; - /** * The date at which this Mute expires and should be unmuted (optional) */ expires: Date | null; @@ -71,10 +65,6 @@ export class Mute extends BaseModel<MuteModel, MuteModelCreationAttributes> impl type: DataTypes.DATE, allowNull: true }, - reason: { - type: DataTypes.STRING, - allowNull: true - }, modlog: { type: DataTypes.STRING, allowNull: false, diff --git a/src/lib/models/PunishmentRole.ts b/src/lib/models/PunishmentRole.ts index 3326dca..927cf28 100644 --- a/src/lib/models/PunishmentRole.ts +++ b/src/lib/models/PunishmentRole.ts @@ -7,7 +7,6 @@ export interface PunishmentRoleModel { id: string; user: string; guild: string; - reason: string; expires: Date; modlog: string; } @@ -15,7 +14,6 @@ export interface PunishmentRoleModelCreationAttributes { id?: string; user: string; guild: string; - reason?: string; expires?: Date; modlog: string; } @@ -37,10 +35,6 @@ export class PunishmentRole */ guild: Snowflake; /** - * The reason they received a role (optional) - */ - reason: string | null; - /** * The date at which this role expires and should be removed (optional) */ expires: Date | null; @@ -74,10 +68,6 @@ export class PunishmentRole type: DataTypes.DATE, allowNull: true }, - reason: { - type: DataTypes.STRING, - allowNull: true - }, modlog: { type: DataTypes.STRING, allowNull: false, |