mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 15:35:11 +00:00
chore: apply splatter's patches
This commit is contained in:
parent
58fd97ba58
commit
7d8c73f36c
1 changed files with 11 additions and 14 deletions
|
@ -75,7 +75,6 @@ async function fetchSticker(id: string) {
|
||||||
|
|
||||||
return body as Sticker;
|
return body as Sticker;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return undefined;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,9 +341,7 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) =
|
||||||
|
|
||||||
// Workaround for cases when it's not available
|
// Workaround for cases when it's not available
|
||||||
// (e.g when using MessageLinkEmkbeds)
|
// (e.g when using MessageLinkEmkbeds)
|
||||||
if (sticker === undefined) {
|
if (sticker === undefined) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return buildMenuItem("Sticker", async () => {
|
return buildMenuItem("Sticker", async () => {
|
||||||
const fetchedSticker = await fetchSticker(favoriteableId);
|
const fetchedSticker = await fetchSticker(favoriteableId);
|
||||||
|
@ -353,19 +350,19 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) =
|
||||||
// Allows the sticker to still be cloned.
|
// Allows the sticker to still be cloned.
|
||||||
if (fetchedSticker === undefined) {
|
if (fetchedSticker === undefined) {
|
||||||
return {
|
return {
|
||||||
"id": sticker?.id,
|
id: sticker?.id,
|
||||||
"name": sticker?.name,
|
name: sticker?.name,
|
||||||
"format_type": sticker?.format_type,
|
format_type: sticker?.format_type,
|
||||||
// Discord has a character limit of at least 1 for tags (aka related emoji)
|
// Discord has a character limit of at least 1 for tags (aka related emoji)
|
||||||
"tags": " ",
|
tags: " ",
|
||||||
"description": "",
|
description: "",
|
||||||
"type": "2",
|
type: "2",
|
||||||
"available": true,
|
available: true,
|
||||||
"guild_id": 0
|
guild_id: 0
|
||||||
};
|
};
|
||||||
} else {
|
|
||||||
return fetchedSticker;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return fetchedSticker;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Add table
Reference in a new issue