summary refs log tree commit diff
path: root/src/api/util/handlers/Message.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-29 21:27:33 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-09-29 21:29:54 +1000
commit835a5ab3a339bebd916d72487cddc4c344121e7b (patch)
treea457fdfa1567de2c95cc83053896da8268078c1e /src/api/util/handlers/Message.ts
parentPrevent URL embedding and mentions when in codeblock (diff)
downloadserver-835a5ab3a339bebd916d72487cddc4c344121e7b.tar.xz
Fix fetching members for roles in POST message
Diffstat (limited to 'src/api/util/handlers/Message.ts')
-rw-r--r--src/api/util/handlers/Message.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/api/util/handlers/Message.ts b/src/api/util/handlers/Message.ts
index 005d9d23..c0bdb6b0 100644
--- a/src/api/util/handlers/Message.ts
+++ b/src/api/util/handlers/Message.ts
@@ -64,7 +64,7 @@ export async function handleMessage(opts: MessageOptions): Promise<Message> {
 		channel_id: opts.channel_id,
 		attachments: opts.attachments || [],
 		embeds: opts.embeds || [],
-		reactions: /*opts.reactions ||*/ [],
+		reactions: /*opts.reactions ||*/[],
 		type: opts.type ?? 0,
 	});
 
@@ -247,12 +247,12 @@ export async function postHandleMessage(message: Message) {
 				const width =
 					parseInt(
 						$('meta[property="og:image:width"]').attr("content") ||
-							"",
+						"",
 					) || undefined;
 				const height =
 					parseInt(
 						$('meta[property="og:image:height"]').attr("content") ||
-							"",
+						"",
 					) || undefined;
 
 				const url = $('meta[property="og:url"]').attr("content");
@@ -317,7 +317,7 @@ export async function postHandleMessage(message: Message) {
 					data.embeds.push(embed);
 				}
 			}
-		} catch (error) {}
+		} catch (error) { }
 	}
 
 	await Promise.all([
@@ -345,7 +345,7 @@ export async function sendMessage(opts: MessageOptions) {
 		} as MessageCreateEvent),
 	]);
 
-	postHandleMessage(message).catch((e) => {}); // no await as it should catch error non-blockingly
+	postHandleMessage(message).catch((e) => { }); // no await as it should catch error non-blockingly
 
 	return message;
 }