summary refs log tree commit diff
path: root/src/util/Member.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-24 20:47:06 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-24 20:47:06 +0200
commit8f87546aeb5c14539601ab25c0e07630a5e5043a (patch)
treec9d5ca2d0c307096d5a4e44768c66b4d8cf05ec4 /src/util/Member.ts
parentMerge pull request #147 from DiegoMagdaleno/master (diff)
downloadserver-8f87546aeb5c14539601ab25c0e07630a5e5043a.tar.xz
:sparkles: use new config
Diffstat (limited to 'src/util/Member.ts')
-rw-r--r--src/util/Member.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/Member.ts b/src/util/Member.ts

index d03a8f12..7b06720b 100644 --- a/src/util/Member.ts +++ b/src/util/Member.ts
@@ -10,11 +10,11 @@ import { RoleModel, toObject, UserModel, - GuildDocument + GuildDocument, + Config } from "@fosscord/server-util"; import { HTTPError } from "lambert-server"; -import * as Config from "./Config"; import { emitEvent } from "./Event"; import { getPublicUser } from "./User"; @@ -39,7 +39,7 @@ export async function isMember(user_id: string, guild_id: string) { export async function addMember(user_id: string, guild_id: string, cache?: { guild?: GuildDocument }) { const user = await getPublicUser(user_id, { guilds: true }); - const { maxGuilds } = Config.apiConfig.getAll().limits.user; + const { maxGuilds } = Config.get().limits.user; if (user.guilds.length >= maxGuilds) { throw new HTTPError(`You are at the ${maxGuilds} server limit.`, 403); }