|
|
@ -322,8 +322,9 @@ const messageContextMenuPatch: NavContextMenuPatchCallback = (children, props) =
|
|
|
|
switch (favoriteableType) {
|
|
|
|
switch (favoriteableType) {
|
|
|
|
case "emoji":
|
|
|
|
case "emoji":
|
|
|
|
const match = props.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${favoriteableId}>|https://cdn\\.discordapp\\.com/emojis/${favoriteableId}\\.`));
|
|
|
|
const match = props.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${favoriteableId}>|https://cdn\\.discordapp\\.com/emojis/${favoriteableId}\\.`));
|
|
|
|
if (!match) return;
|
|
|
|
const reaction = props.message.reactions.find(reaction => reaction.emoji.id === favoriteableId);
|
|
|
|
const name = match[1] ?? "FakeNitroEmoji";
|
|
|
|
if (!match && !reaction) return;
|
|
|
|
|
|
|
|
const name = (match && match[1]) ?? reaction?.emoji.name ?? "FakeNitroEmoji";
|
|
|
|
|
|
|
|
|
|
|
|
return buildMenuItem("Emoji", () => ({
|
|
|
|
return buildMenuItem("Emoji", () => ({
|
|
|
|
id: favoriteableId,
|
|
|
|
id: favoriteableId,
|
|
|
|