riolubruh / YABDP4Nitro

Yet Another BetterDiscord Plugin for Nitro features. Unlock screensharing modes, use cross-server and gif emotes and much more!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nitro emoji feature not working

papaj-na-wrotkach opened this issue · comments

The nitro emoji feature is not working lately - I send a message with an emoji and it renders as a text like :slight_smile:.

I feel like there's more things that are not working and I just don't notice them. For example I have a lot of errors in console when streaming.

Anyways, here are the logs (from DevTools console) with my annotations (starting with #). What I did is:

  • disable all plugins
  • enable YABDP4Nitro (the logs starts here) [line 1]
  • send a message with an emoji (I would need nitro to do that normally)
  • switch to a server [line 38]
  • enter a voice channel [line 39]
  • start streaming (whole screen) [line 301]
  • stop streaming
  • leave voice chat

System info

OS

Manjaro Linux x86_64

Discord Info

stable 289379 (317f5c1) Host 0.0.52 x64 Linux 64-bit (6.9.0-rc5-1-MANJARO)

BetterDiscord

stable 1.10.1

YABDP4Nitro version

5.3.2

My YABDP4Nitro config

show/hide
{
    "currentVersionInfo": {
        "version": "5.3.2",
        "hasShownChangelog": true
    },
    "settings": {
        "emojiSize": 48,
        "screenSharing": true,
        "emojiBypass": true,
        "ghostMode": true,
        "emojiBypassForValidEmoji": true,
        "PNGemote": true,
        "uploadEmotes": false,
        "uploadStickers": false,
        "CustomFPSEnabled": true,
        "CustomFPS": 60,
        "ResolutionEnabled": false,
        "CustomResolution": 1680,
        "CustomBitrateEnabled": true,
        "minBitrate": 2000,
        "maxBitrate": -1,
        "targetBitrate": 5000,
        "voiceBitrate": 960,
        "ResolutionSwapper": false,
        "stickerBypass": false,
        "profileV2": true,
        "forceStickersUnlocked": false,
        "changePremiumType": true,
        "videoCodec": 1,
        "clientThemes": true,
        "lastGradientSettingStore": 21,
        "fakeProfileThemes": true,
        "removeProfileUpsell": true,
        "removeScreenshareUpsell": true,
        "fakeProfileBanners": true,
        "fakeAvatarDecorations": true,
        "unlockAppIcons": true,
        "profileEffects": true,
        "killProfileEffects": false,
        "avatarDecorations": {
            "0": "a_48ca99fcfa4ecc11acdc323534a0ecbb",
            "1": "a_21c7a425b490017478a5558f33f33c63",
            "2": "a_2ca5fb1ecf0dac410b38d76cb4aae7f9",
            "3": "a_be797b0a0efafd45a9ee49aaedbde4d2",
            "4": "a_42f43a32539de2f3f30a348dc8a880e1",
            "5": "a_40d1bf0f84b5042c4777371275294664",
            "6": "a_129e3e818c8319e031d34d4194cf8ecd",
            "7": "a_8b7ad8479ad8cc9996b508b75410e2f9",
            "8": "a_68b9ced89df522993b81a33f43490ef1",
            "9": "a_ea8e2e628bacdddb1ef18cb382aa454c",
            "10": "a_e11ac0d3f2b1301173847b84a1a3268f",
            "11": "a_10b9f886b513b77ccdd67c8784f1a496",
            "12": "a_fed43ab12698df65902ba06727e20c0e",
            "13": "a_d3da36040163ee0f9176dfe7ced45cdc",
            "14": "a_950aea7686c5674b4e2f5df0830d153b",
            "15": "a_8b0d858b65a81ea0c537091a4650a6d4",
            "16": "a_faaa56d945e2d0f6c41cf940d122cb9e",
            "17": "a_9b7b74e72efe1bc5a6beddced3da3c0f",
            "18": "a_aa2e1c2b3cf05b24f6ec7b8b4141f5fc",
            "19": "a_911e48f3a695c7f6c267843ab6a96f2f",
            "20": "a_3c97a2d37f433a7913a1c7b7a735d000",
            "21": "a_f1b2fd4706ab02b54d3a58f84b3ef564",
            "22": "a_8ffa2ba9bff18e96b76c2e66fd0d7fa3",
            "23": "a_d72066b8cecbadd9fc951913ebcc384f",
            "24": "a_55c9d0354290afa8b7fe47ea9bd7dbcf",
            "25": "a_c3c09bd122898be35093d0d59850f627",
            "26": "a_c7e1751e8122f1b475cb3006966fb28c",
            "27": "a_4c9f2ec29c05755456dbce45d8190ed4",
            "28": "a_9d67a1cbf81fe7197c871e94f619b04b",
            "29": "a_29a0533cb3de61aa8179810188f3830d",
            "30": "a_d650e22f6c4bab4fc0969e9d35edbcb0",
            "31": "a_db9baf0ba7cf449d2b027c06309dbe8d",
            "32": "a_fe3c76cac2adf426832a7e495e8329d3",
            "33": "a_1dbc603c181999b9815cb426dfec71a6",
            "34": "a_0f5d6c4dd8ae74662ee9c40722a56cbd",
            "35": "a_88f42fb7360d8224a670a50c3496f315",
            "36": "a_85a8f9ca60cb4328378270a7f13ed7fd",
            "37": "a_a0fafb7c7ee7f1e5b1442f44f3aa14b7",
            "38": "a_a46f14932ac02de32f64139d3b9057b8",
            "39": "a_98555e40cc6802bd3a4fed906af1d992",
            "40": "a_c45abe8c7585fdb41b8d8d4d666f1588",
            "41": "a_a87e3efa4de2956331831681231ce63b",
            "42": "a_09de63526a45be1ddac70e84718ee04a",
            "43": "a_904b1989077c91fca1168d39bfcaa0a4",
            "44": "a_27bbf0b53b1054cf61e9a4c0e8d4027f",
            "45": "a_629689577fa1da2ef0061a5a8c930de1",
            "46": "a_0c0eeb351ae2cf48c6e1eee2cae49d40",
            "47": "a_9867b1ba56601e745cfe741e6b00b835",
            "48": "a_4cd9ae5a8d103c219eacd3674d7730cd",
            "49": "a_ab95c78401ce4ec85c25a6d308db9d85",
            "50": "a_c3cffc19e9784f7d0b005eecdf1b566e",
            "51": "a_f3af281c65cf0cf590e9e1f59e9c6cf6",
            "52": "a_3e1fc3c7ee2e34e8176f4737427e8f4f",
            "53": "a_51d3bb502109eec26c76386ec980bc8b",
            "54": "a_a0db4314b8cc271c8f472357aa895005",
            "55": "a_4cc97277177b166fd7d4af3bdb370815",
            "56": "a_b98e8b204d59882fb7f9f7c86922c0bf",
            "57": "a_a065206df7b011a5510e4e5bca7d49be",
            "58": "a_250640ab00a8837a1d56f35879138177",
            "59": "a_554b7c34f7b6c709f19535aacb128e7b",
            "60": "a_fa014594d4b2b4249e1098c0adc85b47",
            "61": "a_365eed4178528fe8293c4212e8e2d5cb",
            "62": "a_82e4df4028396ad5ccaaafb397fa6248",
            "63": "a_e90ebc0114e7bdc30353c8b11953ea41",
            "64": "a_c6b3bc1dc49e5b284dca0b6437831004",
            "65": "a_cc83efd93ecd6e41857449c3c0ef9b22",
            "66": "a_172fa9da0af8698e37f5e5de76637439",
            "1228246415449264168": "a_49c479e15533fb4c02eb320c9c137433",
            "1228251189276184618": "a_77b7b6a740a9451e1ef39c0252154ef8",
            "1228251373158793251": "a_f740031cc97d1b7eb73c0d0ac1dd09f3",
            "1228251862709567508": "a_e8c11f139e55dac538cdaafb3caa2317",
            "1228252061171449876": "a_bb71042ccd2ca277a69f086a4f3354d0",
            "1228252237407588382": "a_5873ecaa76fb549654b40095293f902e",
            "1220513979898793994": "a_98555e40cc6802bd3a4fed906af1d992",
            "1220513986051837952": "a_c45abe8c7585fdb41b8d8d4d666f1588",
            "1220513991449907280": "a_a87e3efa4de2956331831681231ce63b",
            "1220513996889919548": "a_09de63526a45be1ddac70e84718ee04a",
            "1220514050551709787": "a_904b1989077c91fca1168d39bfcaa0a4",
            "1217624823656611952": "a_27bbf0b53b1054cf61e9a4c0e8d4027f",
            "1217625430320742551": "a_629689577fa1da2ef0061a5a8c930de1",
            "1217625725092233236": "a_0c0eeb351ae2cf48c6e1eee2cae49d40",
            "1217625936015392890": "a_9867b1ba56601e745cfe741e6b00b835",
            "1217626041456001146": "a_4cd9ae5a8d103c219eacd3674d7730cd",
            "1217626222851391529": "a_ab95c78401ce4ec85c25a6d308db9d85",
            "1212569455880699944": "a_c3cffc19e9784f7d0b005eecdf1b566e",
            "1212569932391387137": "a_f3af281c65cf0cf590e9e1f59e9c6cf6",
            "1212570367017885737": "a_3e1fc3c7ee2e34e8176f4737427e8f4f",
            "1212570617404981348": "a_51d3bb502109eec26c76386ec980bc8b",
            "1212581170823561236": "a_a0db4314b8cc271c8f472357aa895005",
            "1212581413958979634": "a_4cc97277177b166fd7d4af3bdb370815",
            "1154896010255015996": "a_c7e1751e8122f1b475cb3006966fb28c",
            "1144305233707671574": "a_c3c09bd122898be35093d0d59850f627",
            "1144307257807491095": "a_55c9d0354290afa8b7fe47ea9bd7dbcf",
            "1144307629225672847": "a_d72066b8cecbadd9fc951913ebcc384f",
            "1144307957425778780": "a_8ffa2ba9bff18e96b76c2e66fd0d7fa3",
            "1174460891727663244": "a_b98e8b204d59882fb7f9f7c86922c0bf",
            "1144308439720394945": "a_3c97a2d37f433a7913a1c7b7a735d000",
            "1207047386778697828": "a_a065206df7b011a5510e4e5bca7d49be",
            "1207047673673420860": "a_250640ab00a8837a1d56f35879138177",
            "1207047813888872518": "a_554b7c34f7b6c709f19535aacb128e7b",
            "1207048053006139492": "a_fa014594d4b2b4249e1098c0adc85b47",
            "1207048292551368745": "a_365eed4178528fe8293c4212e8e2d5cb",
            "1207048659666079814": "a_82e4df4028396ad5ccaaafb397fa6248",
            "1197344345783808161": "a_e90ebc0114e7bdc30353c8b11953ea41",
            "1197344413718949938": "a_c6b3bc1dc49e5b284dca0b6437831004",
            "1197344598675165204": "a_cc83efd93ecd6e41857449c3c0ef9b22",
            "1197344653515690054": "a_172fa9da0af8698e37f5e5de76637439",
            "1144005849740742707": "a_0f5d6c4dd8ae74662ee9c40722a56cbd",
            "1144007738859470929": "a_1dbc603c181999b9815cb426dfec71a6",
            "1144046002110738635": "a_fe3c76cac2adf426832a7e495e8329d3",
            "1144048390594908213": "a_db9baf0ba7cf449d2b027c06309dbe8d",
            "1144048977138946231": "a_d650e22f6c4bab4fc0969e9d35edbcb0",
            "1144049316009353339": "a_29a0533cb3de61aa8179810188f3830d",
            "1144049603109470371": "a_9d67a1cbf81fe7197c871e94f619b04b",
            "1144049924397334652": "a_4c9f2ec29c05755456dbce45d8190ed4",
            "1144058522808614924": "a_d3da36040163ee0f9176dfe7ced45cdc",
            "1144058844004233370": "a_fed43ab12698df65902ba06727e20c0e",
            "1144059132517826602": "a_10b9f886b513b77ccdd67c8784f1a496"
        },
        "customPFPs": true,
        "experiments": true,
        "userPfpIntegration": true,
        "userBgIntegration": true
    }
}
35705.2c21404da8002cd74886.js:1 [BetterDiscord] [Patcher] Could not fire before callback of sendMessage for YABDP4Nitro TypeError: Cannot read properties of undefined (reading 'startsWith')
    at eval (YABDP4Nitro.plugin.js:1546:22)
    at Array.forEach (<anonymous>)
    at Object.eval [as callback] (YABDP4Nitro.plugin.js:1541:35)
    at Object.sendMessage (renderer.js:5:22652)
    at d7dcf54fe7424526d266.js:1:164650

These lines are in cause:
Original method:

if(emoji.url.startsWith("/assets/")) return;

Ghost mode:
if(emoji.url.startsWith("/assets/")){

It seems that Discord removed the url property from emojis. A fix could be to use:

getEmojiURL({ id, animated, size, forcePNG })

Available with:

ZeresPluginLibrary.DiscordModules.AvatarDefaults.getEmojiURL
BdApi.Webpack.getByKeys("getEmojiURL", "DEFAULT_AVATARS", "getUserAvatarURL").getEmojiURL

The plugin uses "emoji.url" on a few more lines, so I'll make sure to check all of those as well.