diff --git a/src/api/routes/guilds/#guild_id/bans.ts b/src/api/routes/guilds/#guild_id/bans.ts index 5d580ebe..5ae9bdb9 100644 --- a/src/api/routes/guilds/#guild_id/bans.ts +++ b/src/api/routes/guilds/#guild_id/bans.ts @@ -109,7 +109,7 @@ router.get( const banInfo = { user: await User.getPublicUser(ban.user_id), reason: ban.reason, - } + }; return res.json(banInfo); }, diff --git a/src/api/routes/guilds/#guild_id/bulk-ban.ts b/src/api/routes/guilds/#guild_id/bulk-ban.ts index 47e7c4cb..f544103a 100644 --- a/src/api/routes/guilds/#guild_id/bulk-ban.ts +++ b/src/api/routes/guilds/#guild_id/bulk-ban.ts @@ -51,10 +51,12 @@ router.post( const { guild_id } = req.params; const userIds: Array = req.body.user_ids; - if (!userIds) - throw new HTTPError("The user_ids array is missing", 400); + if (!userIds) throw new HTTPError("The user_ids array is missing", 400); if (userIds.length > 200) - throw new HTTPError("The user_ids array must be between 1 and 200 in length", 400); + throw new HTTPError( + "The user_ids array must be between 1 and 200 in length", + 400, + ); const banned_users = []; const failed_users = []; @@ -116,8 +118,12 @@ router.post( } } - if (banned_users.length === 0 && failed_users.length > 0) throw DiscordApiErrors.BULK_BAN_FAILED; - return res.json({ banned_users: banned_users, failed_users: failed_users }); + if (banned_users.length === 0 && failed_users.length > 0) + throw DiscordApiErrors.BULK_BAN_FAILED; + return res.json({ + banned_users: banned_users, + failed_users: failed_users, + }); }, ); diff --git a/src/api/util/handlers/route.ts b/src/api/util/handlers/route.ts index fb2b444f..2c98783a 100644 --- a/src/api/util/handlers/route.ts +++ b/src/api/util/handlers/route.ts @@ -96,7 +96,9 @@ export function route(opts: RouteOptions) { req.params.channel_id, ); - const requiredPerms = Array.isArray(opts.permission) ? opts.permission : [opts.permission]; + const requiredPerms = Array.isArray(opts.permission) + ? opts.permission + : [opts.permission]; requiredPerms.forEach((perm) => { // bitfield comparison: check if user lacks certain permission if (!req.permission!.has(new Permissions(perm))) { diff --git a/src/util/util/Constants.ts b/src/util/util/Constants.ts index d61bcaca..98ae2d31 100644 --- a/src/util/util/Constants.ts +++ b/src/util/util/Constants.ts @@ -1003,10 +1003,7 @@ export const DiscordApiErrors = { "Message was blocked by automatic moderation", 200000, ), - BULK_BAN_FAILED: new ApiError( - "Failed to ban users", - 500000 - ), + BULK_BAN_FAILED: new ApiError("Failed to ban users", 500000), //Other errors UNKNOWN_VOICE_STATE: new ApiError("Unknown Voice State", 10065, 404),