mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-11 02:16:23 +00:00
embed support
This commit is contained in:
parent
79118251c8
commit
0e9c1ebea8
1 changed files with 12 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue