1
0
Fork 1
mirror of https://github.com/Vendicated/Vencord.git synced 2025-01-11 02:16:23 +00:00

embed support

This commit is contained in:
camila314 2024-01-04 12:54:08 -06:00
parent 79118251c8
commit 0e9c1ebea8

View file

@ -182,7 +182,18 @@ export default definePlugin({
if (settings.store.ignoreBots && m.author.bot) if (settings.store.ignoreBots && m.author.bot)
return; return;
if (regexes.some(r => r != "" && safeMatchesRegex(m.content, r))) { let matches = false;
if (regexes.some(r => r != "" && (safeMatchesRegex(m.content, r)))) {
matches = true;
}
for (let embed of m.embeds) {
if (regexes.some(r => r != "" && (safeMatchesRegex(embed.description, r) || safeMatchesRegex(embed.title, r)))) {
matches = true;
}
}
if (matches) {
m.mentions.push(this.me); m.mentions.push(this.me);
if (m.author.id != this.me.id) if (m.author.id != this.me.id)