summary refs log tree commit diff
path: root/src/api/routes/guilds/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/guilds/index.ts')
-rw-r--r--src/api/routes/guilds/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/routes/guilds/index.ts b/src/api/routes/guilds/index.ts
index e4d66192..6946e2f7 100644
--- a/src/api/routes/guilds/index.ts
+++ b/src/api/routes/guilds/index.ts
@@ -1,6 +1,6 @@
-import { Router, Request, Response } from "express";
-import { Role, Guild, Snowflake, Config, getRights, Member, Channel, DiscordApiErrors, handleFile, GuildCreateSchema } from "@fosscord/util";
 import { route } from "@fosscord/api";
+import { Config, DiscordApiErrors, getRights, Guild, GuildCreateSchema, Member } from "@fosscord/util";
+import { Request, Response, Router } from "express";
 
 const router: Router = Router();
 
@@ -12,7 +12,7 @@ router.post("/", route({ body: "GuildCreateSchema", right: "CREATE_GUILDS" }), a
 	const { maxGuilds } = Config.get().limits.user;
 	const guild_count = await Member.count({ where: { id: req.user_id } });
 	const rights = await getRights(req.user_id);
-	if ((guild_count >= maxGuilds)&&!rights.has("MANAGE_GUILDS")) {
+	if (guild_count >= maxGuilds && !rights.has("MANAGE_GUILDS")) {
 		throw DiscordApiErrors.MAXIMUM_GUILDS.withParams(maxGuilds);
 	}