aboutsummaryrefslogtreecommitdiff
path: root/src/lib/models
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/models')
-rw-r--r--src/lib/models/instance/ActivePunishment.ts5
-rw-r--r--src/lib/models/instance/Guild.ts3
-rw-r--r--src/lib/models/instance/Level.ts3
-rw-r--r--src/lib/models/instance/ModLog.ts3
-rw-r--r--src/lib/models/instance/Reminder.ts3
-rw-r--r--src/lib/models/instance/StickyRole.ts3
-rw-r--r--src/lib/models/shared/Global.ts3
-rw-r--r--src/lib/models/shared/Shared.ts3
-rw-r--r--src/lib/models/shared/Stat.ts3
9 files changed, 28 insertions, 1 deletions
diff --git a/src/lib/models/instance/ActivePunishment.ts b/src/lib/models/instance/ActivePunishment.ts
index 1d6104f..38012ca 100644
--- a/src/lib/models/instance/ActivePunishment.ts
+++ b/src/lib/models/instance/ActivePunishment.ts
@@ -31,6 +31,9 @@ export interface ActivePunishmentModelCreationAttributes {
modlog: string;
}
+/**
+ * Keeps track of active punishments so they can be removed later.
+ */
export class ActivePunishment
extends BaseModel<ActivePunishmentModel, ActivePunishmentModelCreationAttributes>
implements ActivePunishmentModel
@@ -77,7 +80,7 @@ export class ActivePunishment
public static initModel(sequelize: Sequelize): void {
ActivePunishment.init(
{
- id: { type: DataTypes.STRING, primaryKey: true, allowNull: false, defaultValue: nanoid },
+ id: { type: DataTypes.STRING, primaryKey: true, defaultValue: nanoid },
type: { type: DataTypes.STRING, allowNull: false },
user: { type: DataTypes.STRING, allowNull: false },
guild: { type: DataTypes.STRING, allowNull: false, references: { model: 'Guilds', key: 'id' } },
diff --git a/src/lib/models/instance/Guild.ts b/src/lib/models/instance/Guild.ts
index 11469d2..b41eb9e 100644
--- a/src/lib/models/instance/Guild.ts
+++ b/src/lib/models/instance/Guild.ts
@@ -47,6 +47,9 @@ export interface GuildModelCreationAttributes {
levelUpChannel?: Snowflake;
}
+/**
+ * Settings for a guild.
+ */
export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> implements GuildModel {
/**
* The ID of the guild
diff --git a/src/lib/models/instance/Level.ts b/src/lib/models/instance/Level.ts
index e18753d..77bc3d4 100644
--- a/src/lib/models/instance/Level.ts
+++ b/src/lib/models/instance/Level.ts
@@ -15,6 +15,9 @@ export interface LevelModelCreationAttributes {
xp?: number;
}
+/**
+ * Leveling information for a user in a guild.
+ */
export class Level extends BaseModel<LevelModel, LevelModelCreationAttributes> implements LevelModel {
/**
* The user's id.
diff --git a/src/lib/models/instance/ModLog.ts b/src/lib/models/instance/ModLog.ts
index bcccbb4..c25f043 100644
--- a/src/lib/models/instance/ModLog.ts
+++ b/src/lib/models/instance/ModLog.ts
@@ -49,6 +49,9 @@ export interface ModLogModelCreationAttributes {
hidden?: boolean;
}
+/**
+ * A mod log case.
+ */
export class ModLog extends BaseModel<ModLogModel, ModLogModelCreationAttributes> implements ModLogModel {
/**
* The primary key of the modlog entry.
diff --git a/src/lib/models/instance/Reminder.ts b/src/lib/models/instance/Reminder.ts
index 9ca78f1..964ea63 100644
--- a/src/lib/models/instance/Reminder.ts
+++ b/src/lib/models/instance/Reminder.ts
@@ -24,6 +24,9 @@ export interface ReminderModelCreationAttributes {
notified?: boolean;
}
+/**
+ * Represents a reminder the a user has set.
+ */
export class Reminder extends BaseModel<ReminderModel, ReminderModelCreationAttributes> implements ReminderModel {
/**
* The id of the reminder.
diff --git a/src/lib/models/instance/StickyRole.ts b/src/lib/models/instance/StickyRole.ts
index fb1c30d..00e98ce 100644
--- a/src/lib/models/instance/StickyRole.ts
+++ b/src/lib/models/instance/StickyRole.ts
@@ -16,6 +16,9 @@ export interface StickyRoleModelCreationAttributes {
nickname?: string;
}
+/**
+ * Information about a user's roles and nickname when they leave a guild.
+ */
export class StickyRole extends BaseModel<StickyRoleModel, StickyRoleModelCreationAttributes> implements StickyRoleModel {
/**
* The id of the user the roles belongs to.
diff --git a/src/lib/models/shared/Global.ts b/src/lib/models/shared/Global.ts
index 6dfc36f..b1aa0cc 100644
--- a/src/lib/models/shared/Global.ts
+++ b/src/lib/models/shared/Global.ts
@@ -19,6 +19,9 @@ export interface GlobalModelCreationAttributes {
blacklistedChannels?: Snowflake[];
}
+/**
+ * Data specific to a certain instance of the bot.
+ */
export class Global extends BaseModel<GlobalModel, GlobalModelCreationAttributes> implements GlobalModel {
/**
* The bot's environment.
diff --git a/src/lib/models/shared/Shared.ts b/src/lib/models/shared/Shared.ts
index 642ff85..4d13011 100644
--- a/src/lib/models/shared/Shared.ts
+++ b/src/lib/models/shared/Shared.ts
@@ -24,6 +24,9 @@ export interface SharedModelCreationAttributes {
autoBanCode?: string;
}
+/**
+ * Data shared between all bot instances.
+ */
export class Shared extends BaseModel<SharedModel, SharedModelCreationAttributes> implements SharedModel {
/**
* The primary key of the shared model.
diff --git a/src/lib/models/shared/Stat.ts b/src/lib/models/shared/Stat.ts
index 8f77b58..d138620 100644
--- a/src/lib/models/shared/Stat.ts
+++ b/src/lib/models/shared/Stat.ts
@@ -14,6 +14,9 @@ export interface StatModelCreationAttributes {
commandsUsed?: bigint;
}
+/**
+ * Statistics for each instance of the bot.
+ */
export class Stat extends BaseModel<StatModel, StatModelCreationAttributes> implements StatModel {
/**
* The bot's environment.