diff options
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/index.ts | 13 | ||||
-rw-r--r-- | lib/models/instance/ActivePunishment.ts | 3 | ||||
-rw-r--r-- | lib/models/instance/Guild.ts | 6 | ||||
-rw-r--r-- | lib/models/instance/Highlight.ts | 3 | ||||
-rw-r--r-- | lib/models/instance/Level.ts | 3 | ||||
-rw-r--r-- | lib/models/instance/ModLog.ts | 3 | ||||
-rw-r--r-- | lib/models/instance/Reminder.ts | 3 | ||||
-rw-r--r-- | lib/models/instance/StickyRole.ts | 3 | ||||
-rw-r--r-- | lib/models/shared/Global.ts | 3 | ||||
-rw-r--r-- | lib/models/shared/Shared.ts | 3 | ||||
-rw-r--r-- | lib/models/shared/Stat.ts | 3 |
11 files changed, 24 insertions, 22 deletions
diff --git a/lib/models/index.ts b/lib/models/index.ts new file mode 100644 index 0000000..ae82fb7 --- /dev/null +++ b/lib/models/index.ts @@ -0,0 +1,13 @@ +export * from './BaseModel.js'; +export * from './instance/ActivePunishment.js'; +export * from './instance/Guild.js'; +export * from './instance/Highlight.js'; +export * from './instance/Level.js'; +export * from './instance/ModLog.js'; +export * from './instance/Reminder.js'; +export * from './instance/StickyRole.js'; +export * from './shared/Global.js'; +export * from './shared/GuildCount.js'; +export * from './shared/MemberCount.js'; +export * from './shared/Shared.js'; +export * from './shared/Stat.js'; diff --git a/lib/models/instance/ActivePunishment.ts b/lib/models/instance/ActivePunishment.ts index 38012ca..9bd9d01 100644 --- a/lib/models/instance/ActivePunishment.ts +++ b/lib/models/instance/ActivePunishment.ts @@ -1,8 +1,7 @@ import { type Snowflake } from 'discord.js'; import { nanoid } from 'nanoid'; -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export enum ActivePunishmentType { BAN = 'BAN', diff --git a/lib/models/instance/Guild.ts b/lib/models/instance/Guild.ts index f258d48..1d645e9 100644 --- a/lib/models/instance/Guild.ts +++ b/lib/models/instance/Guild.ts @@ -1,9 +1,9 @@ +import config from '#config'; import { ChannelType, Constants, type Snowflake } from 'discord.js'; -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BadWordDetails } from '../../automod/AutomodShared.js'; import { type BushClient } from '../../extensions/discord-akairo/BushClient.js'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export interface GuildModel { id: Snowflake; @@ -199,8 +199,6 @@ const asGuildSetting = <T>(et: { [K in keyof T]: PartialBy<GuildSetting, 'config return et as { [K in keyof T]: GuildSetting }; }; -const { default: config } = await import('../../../config/options.js'); - export const guildSettingsObj = asGuildSetting({ prefix: { name: 'Prefix', diff --git a/lib/models/instance/Highlight.ts b/lib/models/instance/Highlight.ts index 5889fad..38c7990 100644 --- a/lib/models/instance/Highlight.ts +++ b/lib/models/instance/Highlight.ts @@ -1,8 +1,7 @@ import { type Snowflake } from 'discord.js'; import { nanoid } from 'nanoid'; -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export interface HighlightModel { pk: string; diff --git a/lib/models/instance/Level.ts b/lib/models/instance/Level.ts index d8d16f0..e22d63b 100644 --- a/lib/models/instance/Level.ts +++ b/lib/models/instance/Level.ts @@ -1,7 +1,6 @@ import { type Snowflake } from 'discord.js'; -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export interface LevelModel { user: Snowflake; diff --git a/lib/models/instance/ModLog.ts b/lib/models/instance/ModLog.ts index c25f043..324ad83 100644 --- a/lib/models/instance/ModLog.ts +++ b/lib/models/instance/ModLog.ts @@ -1,8 +1,7 @@ import { type Snowflake } from 'discord.js'; import { nanoid } from 'nanoid'; -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export enum ModLogType { PERM_BAN = 'PERM_BAN', diff --git a/lib/models/instance/Reminder.ts b/lib/models/instance/Reminder.ts index 964ea63..8d46edb 100644 --- a/lib/models/instance/Reminder.ts +++ b/lib/models/instance/Reminder.ts @@ -1,8 +1,7 @@ import { Snowflake } from 'discord.js'; import { nanoid } from 'nanoid'; -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export interface ReminderModel { id: string; diff --git a/lib/models/instance/StickyRole.ts b/lib/models/instance/StickyRole.ts index 00e98ce..90ded0e 100644 --- a/lib/models/instance/StickyRole.ts +++ b/lib/models/instance/StickyRole.ts @@ -1,7 +1,6 @@ import { type Snowflake } from 'discord.js'; -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export interface StickyRoleModel { user: Snowflake; diff --git a/lib/models/shared/Global.ts b/lib/models/shared/Global.ts index b1aa0cc..eb6c5dd 100644 --- a/lib/models/shared/Global.ts +++ b/lib/models/shared/Global.ts @@ -1,7 +1,6 @@ import { type Snowflake } from 'discord.js'; -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export interface GlobalModel { environment: 'production' | 'development' | 'beta'; diff --git a/lib/models/shared/Shared.ts b/lib/models/shared/Shared.ts index dec77d1..bf8d461 100644 --- a/lib/models/shared/Shared.ts +++ b/lib/models/shared/Shared.ts @@ -1,8 +1,7 @@ import { Snowflake } from 'discord.js'; -import type { Sequelize } from 'sequelize'; +import { DataTypes, Sequelize } from 'sequelize'; import { BadWords } from '../../automod/AutomodShared.js'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; export interface SharedModel { primaryKey: 0; diff --git a/lib/models/shared/Stat.ts b/lib/models/shared/Stat.ts index 8e2e0b3..bce1620 100644 --- a/lib/models/shared/Stat.ts +++ b/lib/models/shared/Stat.ts @@ -1,6 +1,5 @@ -import { type Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from '../BaseModel.js'; -const { DataTypes } = (await import('sequelize')).default; type Environment = 'production' | 'development' | 'beta'; |