Prettified Code!

This commit is contained in:
itohatweb
2021-05-21 15:51:33 +00:00
committed by GitHub Action
parent fe4ab8517b
commit 3549cdeb63
279 changed files with 1617 additions and 1768 deletions
+3 -6
View File
@@ -9,21 +9,18 @@ export async function handleMessageUpdate(data: DiscordGatewayPayload) {
const payload = data.d as Message;
const channel = await cacheHandlers.get(
"channels",
snowflakeToBigint(payload.channelId),
snowflakeToBigint(payload.channelId)
);
if (!channel) return;
const oldMessage = await cacheHandlers.get(
"messages",
snowflakeToBigint(payload.id),
snowflakeToBigint(payload.id)
);
if (!oldMessage) return;
// Messages with embeds can trigger update but they wont have edited_timestamp
if (
!payload.editedTimestamp ||
(oldMessage.content === payload.content)
) {
if (!payload.editedTimestamp || oldMessage.content === payload.content) {
return;
}