From 11973397c812da59c2d544047bbb2d2d9ae583a7 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 17 Dec 2025 09:58:25 +0100 Subject: Prettier u15 --- src/api/routes/channels/#channel_id/messages/index.ts | 17 ++++++++++------- src/api/routes/users/@me/settings-proto/1.ts | 3 +-- src/api/routes/users/@me/settings-proto/2.ts | 3 +-- 3 files changed, 12 insertions(+), 11 deletions(-) (limited to 'src/api') diff --git a/src/api/routes/channels/#channel_id/messages/index.ts b/src/api/routes/channels/#channel_id/messages/index.ts index 0a84e6b0c..edca59dfe 100644 --- a/src/api/routes/channels/#channel_id/messages/index.ts +++ b/src/api/routes/channels/#channel_id/messages/index.ts @@ -19,7 +19,8 @@ import { handleMessage, postHandleMessage, route } from "@spacebar/api"; import { Attachment, - AutomodExecutor, AutomodInvocation, + AutomodExecutor, + AutomodInvocation, AutomodRule, AutomodTriggerTypes, Channel, @@ -443,13 +444,15 @@ router.post( // @ts-ignore message.member.roles = message.member.roles.filter((x) => x.id != x.guild_id).map((x) => x.id); - const automodResult = await AutomodExecutor.executeInvocation(new AutomodInvocation({ - eventType: AutomodRuleEventType.MESSAGE_SEND, - guildId: message.guild_id, - payload: message - })); + const automodResult = await AutomodExecutor.executeInvocation( + new AutomodInvocation({ + eventType: AutomodRuleEventType.MESSAGE_SEND, + guildId: message.guild_id, + payload: message, + }), + ); - if(automodResult.blocked) { + if (automodResult.blocked) { throw new HTTPError("Unhandled error sending message", 403); } } diff --git a/src/api/routes/users/@me/settings-proto/1.ts b/src/api/routes/users/@me/settings-proto/1.ts index c4fde496f..46b2f3b80 100644 --- a/src/api/routes/users/@me/settings-proto/1.ts +++ b/src/api/routes/users/@me/settings-proto/1.ts @@ -137,8 +137,7 @@ async function patchUserSettings(userId: string, updatedSettings: PreloadedUserS }; } - if (EnvConfig.get().logging.logProtoUpdates.includes("SETTINGS")) - console.log(`Updating user settings for user ${userId} with atomic=${atomic}:`, updatedSettings); + if (EnvConfig.get().logging.logProtoUpdates.includes("SETTINGS")) console.log(`Updating user settings for user ${userId} with atomic=${atomic}:`, updatedSettings); if (!atomic) { settings = PreloadedUserSettings.fromJson( diff --git a/src/api/routes/users/@me/settings-proto/2.ts b/src/api/routes/users/@me/settings-proto/2.ts index d162715d2..efc92faaf 100644 --- a/src/api/routes/users/@me/settings-proto/2.ts +++ b/src/api/routes/users/@me/settings-proto/2.ts @@ -137,8 +137,7 @@ async function patchUserSettings(userId: string, updatedSettings: FrecencyUserSe }; } - if (EnvConfig.get().logging.logProtoUpdates.includes("FRECENCY")) - console.log(`Updating frecency settings for user ${userId} with atomic=${atomic}:`, updatedSettings); + if (EnvConfig.get().logging.logProtoUpdates.includes("FRECENCY")) console.log(`Updating frecency settings for user ${userId} with atomic=${atomic}:`, updatedSettings); if (!atomic) { settings = FrecencyUserSettings.fromJson( -- cgit 1.5.1