Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions src/services/databaseManager.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
/* eslint-disable no-console */
import { type Snowflake } from 'discord.js';
import mongoose, { type Connection } from 'mongoose';
import { Snowflake } from 'discord.js';
import mongoose, { Connection } from 'mongoose';

import {
type IChannel,
type IGuildMember,
type IHeatMap,
type IMemberActivity,
type IRawInfo,
type IRole,
} from '../interfaces';
import { IChannel, IGuildMember, IHeatMap, IMemberActivity, IRawInfo, IRole, IThread } from '../interfaces';
import {
channelSchema,
guildMemberSchema,
heatMapSchema,
MemberActivitySchema,
rawInfoSchema,
roleSchema,
threadSchema,
} from '../models/schemas';

export default class DatabaseManager {
Expand Down Expand Up @@ -57,6 +51,7 @@ export default class DatabaseManager {
db.model<IGuildMember>('GuildMember', guildMemberSchema);
db.model<IChannel>('Channel', channelSchema);
db.model<IRole>('Role', roleSchema);
db.model<IThread>('Thread', threadSchema);
}
} catch (err) {
console.error(`Error setting up models for ${db.name}:`, err);
Expand Down