Closed Thebomb32 closed 4 months ago
Solved.
Changed code to
function replaceEmoji(parseResult, emoji) {
const emojiUrl = https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? "gif" : "webp"}
;
parseResult.content = parseResult.content.replace(
<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>
,
[\\\]](${emojiUrl + '?size=48'})
);
}
If for some reason that does not work there is an alternative
function replaceEmoji(parseResult, emoji) {
const emojiUrl = https://cdn.discordapp.com/emojis/${emoji.id}.${emoji.animated ? "gif" : "webp"}
;
parseResult.content = parseResult.content.replace
(<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>
,
[\n\\]](\n${emojiUrl + '?size=48'}\n)
);
}
@Thebomb32 Do you think this makes sense? Moderators can change the rule, or just ban you)
@Thebomb32 Do you think this makes sense? Moderators can change the rule, or just ban you)
@DanzoGit The rule is in place to block malicious links. Given that this is just emojis, I hardly believe anyone in their right mind would care. For the rule thing yes, they can change the rule and more changes to the code are needed if it stops working in the future.
The mods in a discord server that I am active in recently updated their automod to block markdown embeds.
There is the rule they have added.
Wondering if there is any bypass that can be achieved to get around this.
Thanks,