An00nymushun / DiscordFreeEmojis

228 stars 120 forks source link

Cannot send custom emojis in DMs #91

Open DaSunyxo opened 5 months ago

DaSunyxo commented 5 months ago

In case you don't know where the bug is in the code or what exactly causes it.

Describe the bug When trying to send a custom emoji that was either typed in or picked from the emoji picker in DMs, Discord doesn't let you send the message at all and blacks out the "typing bar" (I don't know what it's called, but it's where you type messages), preventing you from sending messages at all until you open another DM or a server channel.

To Reproduce Simply try to DM someone a custom emoji.

Steps to reproduce the behavior:

  1. Go to your DMs
  2. Pick any conversation
  3. Type out/pick any custom emoji
  4. Try to send the message
  5. Message doesn't send and you cannot send any message

Make sure you can reproduce this problem yourself with your steps after restarting Discord!

Expected behavior Normally, you should be able to send the custom emoji without any issues.

Screenshots Before pressing enter: Screenshot 2024-06-11 124019 After pressing enter: Screenshot 2024-06-11 124255

Client:

Additional context Add any other context about the problem here.

Parad1se-py commented 5 months ago

Yeah, noticed this happening for me too

JackAttacktl commented 4 months ago

Same issue

KatTheGhost commented 3 months ago

This happens on the official linux release client as well, has been for a few months now

JackAttacktl commented 3 months ago

For me it has extended to all servers, not just DMS Please fix it, literally makes the plugin unusable

JackAttacktl commented 3 months ago

Error code seems to be

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'split') at replaceEmoji (DiscordFreeEmojis64px.plugin.js:148:151) at Object.parseHook (DiscordFreeEmojis64px.plugin.js:156:17) at Init.messageEmojiParserModule.parse (DiscordFreeEmojis64px.plugin.js:122:68) at 2b9ba375e94bf3299698.js:1:157176

JackAttacktl commented 3 months ago

It seems that "emoji" doesn't have a parameter "url", at least not anymore. Probably an update broke it and it hasn't been updated. I made a simple fix, I changed line 146 to

parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, "https://cdn.discordapp.com/emojis/" + emoji.id + ".webp" + "?size=64");

asibhossen897 commented 2 months ago

This happens on the official linux release client as well, has been for a few months now

Same for me on Linux Mint

asibhossen897 commented 2 months ago

It seems that "emoji" doesn't have a parameter "url", at least not anymore. Probably an update broke it and it hasn't been updated. I made a simple fix, I changed line 146 to

parseResult.content = parseResult.content.replace(<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>, "https://cdn.discordapp.com/emojis/" + emoji.id + ".webp" + "?size=64");

Thanks a lot,this is working for me.

SNOW-yz commented 2 months ago

It seems that "emoji" doesn't have a parameter "url", at least not anymore. Probably an update broke it and it hasn't been updated. I made a simple fix, I changed line 146 to

parseResult.content = parseResult.content.replace(<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>, "https://cdn.discordapp.com/emojis/" + emoji.id + ".webp" + "?size=64");

@JackAttacktl . This also worked for me, thank you so much. It only sends non-animated emoji's for me. the animated ones become pictures

LeoneVi commented 2 months ago

It seems that "emoji" doesn't have a parameter "url", at least not anymore. Probably an update broke it and it hasn't been updated. I made a simple fix, I changed line 146 to

parseResult.content = parseResult.content.replace(<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>, "https://cdn.discordapp.com/emojis/" + emoji.id + ".webp" + "?size=64");

worked for me, thanks!

DaSunyxo commented 1 month ago

It seems that "emoji" doesn't have a parameter "url", at least not anymore. Probably an update broke it and it hasn't been updated. I made a simple fix, I changed line 146 to

parseResult.content = parseResult.content.replace(<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>, "https://cdn.discordapp.com/emojis/" + emoji.id + ".webp" + "?size=64");

Hey, this doesn't work for me, unfortunately. I copy and pasted the line at line 146 and it still doesn't work. Instead, it sends the emojis in plain text, so an emoji named "wtf" would simply appear as :wtf:

image

Faathir81 commented 1 month ago

It seems that "emoji" doesn't have a parameter "url", at least not anymore. Probably an update broke it and it hasn't been updated. I made a simple fix, I changed line 146 to parseResult.content = parseResult.content.replace(<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>, "https://cdn.discordapp.com/emojis/" + emoji.id + ".webp" + "?size=64");

@JackAttacktl . This also worked for me, thank you so much. It only sends non-animated emoji's for me. the animated ones become pictures

use this one: parseResult.content = parseResult.content.replace(<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>, https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? "gif" : "webp"}?size=64);

i had the same problem as you before, and then im trying to added "gif" to the code and it works lol