Compare commits

..

1 commit

Author SHA1 Message Date
Slincnik
2fd25f074d
Merge b45f3dcc35 into 12054c35c5 2024-12-25 19:13:40 +03:00

View file

@ -7,6 +7,9 @@ import logger from "../helpers/logger.js";
import ConfigService from "../services/config/index.js";
import InternationalizationService from "../services/languages/index.js";
import { SUPER_CONTEXT } from "../constants/index.js";
import GuildModel from "../models/GuildModel.js";
import UserModel from "../models/UserModel.js";
import MemberModel from "../models/MemberModel.js";
export class ExtendedClient extends Client {
/**
@ -45,7 +48,6 @@ export class ExtendedClient extends Client {
* @returns {Promise<GuildModel>} The guild data object, either retrieved from the database or newly created.
*/
async getGuildData(guildId) {
const { default: GuildModel } = await import("../models/GuildModel.js");
let guildData = await this.adapter.findOne(GuildModel, { id: guildId });
if (!guildData) {
@ -62,7 +64,6 @@ export class ExtendedClient extends Client {
* @returns {Promise<UserModel>} The user data object, either retrieved from the database or newly created.
*/
async getUserData(userID) {
const { default: UserModel } = await import("../models/GuildModel.js");
let userData = await this.adapter.findOne(UserModel, { id: userID });
if (!userData) {
@ -80,7 +81,6 @@ export class ExtendedClient extends Client {
* @returns {Promise<MemberModel>} The member data object, either retrieved from the database or newly created.
*/
async getMemberData(memberId, guildId) {
const { default: MemberModel } = await import("../models/GuildModel.js");
let memberData = await this.adapter.findOne(MemberModel, { guildID: guildId, id: memberId });
if (!memberData) {