DiscordFreeEmojis
DiscordFreeEmojis copied to clipboard
Cannot send custom emojis in DMs
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:
- Go to your DMs
- Pick any conversation
- Type out/pick any custom emoji
- Try to send the message
- 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:
After pressing enter:
Client:
- Discord for PC (Windows 11)
- Discord update channel: Release
- Plugin V1.7
- BD V1.10.1
Additional context Add any other context about the problem here.
Yeah, noticed this happening for me too
Same issue
This happens on the official linux release client as well, has been for a few months now
For me it has extended to all servers, not just DMS Please fix it, literally makes the plugin unusable
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
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");
This happens on the official linux release client as well, has been for a few months now
Same for me on Linux Mint
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.
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
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!
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:
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
Doesn't work. It says "Could not be compiled" and it gives me this error:
DiscordFreeEmojis64px.plugin.js:146 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); ^
SyntaxError: missing ) after argument list at internalCompileFunction (node:internal/vm:128:18) at Object.compileFunction (node:vm:364:10) at Module.N (C:\Users\dm629\AppData\Roaming\BetterDiscord\data\betterdiscord.asar\preload.js:1:4884)
It worked just fine until now.
BruHh fire solution incoming🔥 just replace this clown code (lines 137 - 169) with my cleanmaxxing rizz up code:
searchHook = function() {
let result = Discord.original_searchWithoutFetchingLatest.apply(this, arguments);
console.log({result, arguments})
result.unlocked.push(...result.locked);
result.locked = [];
return result;
}
function replaceEmoji(parseResult, emoji) {
const emojiUrl = `https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? "gif" : "webp"}?size=48`;
parseResult.content = parseResult.content.replace(`<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`, emojiUrl);
}
parseHook = function() {
let result = original_parse.apply(this, arguments);
if(result.invalidEmojis.length !== 0) {
for(let emoji of result.invalidEmojis) {
replaceEmoji(result, emoji);
}
result.invalidEmojis = [];
}
let validNonShortcutEmojis = result.validNonShortcutEmojis;
for (let i = 0; i < validNonShortcutEmojis.length; i++) {
const emoji = validNonShortcutEmojis[i];
if(!emoji.available) {
replaceEmoji(result, emoji);
validNonShortcutEmojis.splice(i, 1);
i--;
}
}
return result;
};
@DexulDev Thanks, it works hehe.
@DexulDev It does not work :(
@MountainLabz It should be working now—I’ve tested it today and haven’t run into any issues. I’ve submitted a PR to the plugin repository with the fix; you can check it out here if you’d like to review it: PR on GitHub. If you prefer to install the updated version directly, you can download it here: Latest version. Let me know if you run into any trouble!
@MountainLabz It should be working now—I’ve tested it today and haven’t run into any issues. I’ve submitted a PR to the plugin repository with the fix; you can check it out here if you’d like to review it: PR on GitHub. If you prefer to install the updated version directly, you can download it here: Latest version. Let me know if you run into any trouble!
I used your version, not working anymore,
when i click an emote
i get this
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:
i cant copy and paste into the plug in edit (in my discord settings) is there a way to copy and paste otherwise?
@DexulDev i can't copy and paste into my discordfreeemoji plugin edit in my discord settings. can you explain to me how to copy and paste into the edit button code?
@dhaha7 @FahadBinHussain @MountainLabz
@DexulDev I can't copy and paste into my DiscordFreeEmoji plugin edit in my Discord settings. Can you explain to me how to copy and paste into the edit button code?
DON'T USE MY CHANGES ANYMORE — USE ANOTHER PLUGIN INSTEAD — READ EVERYTHING BEFORE DOING ANYTHING
Unfortunately, I am not able to check if the plugin changes I made are still working.
If they don't work, try installing this plugin, which emulates/bypasses Nitro features for Discord.
Features like streaming at 60fps (or custom framerates) and 1440p resolution work, and even Discord Nitro emojis work as well.
I recommend using that plugin instead of mine because it does things better, is built differently, works more efficiently, and is more customizable.
However, if you still want to try my version, I recommend using VSCode to paste the code, or you can try installing the PR I made for the plugin here.
- I truly appreciate that you took the time to try out my version, and believe me, I’m genuinely happy to have contributed in some way.
- However, I am not actively involved with this repository, and I don't want to take on the responsibility of constantly maintaining this change.
- I originally made the PR just for fun and out of passion, but since it was never merged, I strongly recommend using another plugin — the one I mentioned earlier — instead of my code.