aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSammy <sammy@sammcheese.net>2023-06-27 22:41:33 +0200
committerGitHub <noreply@github.com>2023-06-27 22:41:33 +0200
commit1d8dcef394726a22abcb075a85c8cbaf75091761 (patch)
treeb16070648fc7c2918e0492c4d13680bfc743ad46 /src/plugins
parent4fe284523444f5da8594dc42a2c8601a9c73b777 (diff)
downloadVencord-1d8dcef394726a22abcb075a85c8cbaf75091761.tar.gz
Vencord-1d8dcef394726a22abcb075a85c8cbaf75091761.tar.bz2
Vencord-1d8dcef394726a22abcb075a85c8cbaf75091761.zip
InvisibleChat: fix indicator & crashes (#1356)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/invisibleChat/index.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/invisibleChat/index.tsx b/src/plugins/invisibleChat/index.tsx
index 6f21628..43b48f1 100644
--- a/src/plugins/invisibleChat/index.tsx
+++ b/src/plugins/invisibleChat/index.tsx
@@ -132,7 +132,7 @@ export default definePlugin({
find: ".Messages.MESSAGE_EDITED,",
replacement: {
match: /var .,.,.=(.)\.className,.=.\.message,.=.\.children,.=.\.content,.=.\.onUpdate/gm,
- replace: "try {$1 && $self.INV_REGEX.test($1.content[0]) ? $1.content.push($self.indicator()) : null } catch {};$&"
+ replace: "try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"
}
},
{
@@ -200,8 +200,11 @@ export default definePlugin({
},
});
- if (urlCheck?.length)
- message.embeds.push(await this.getEmbed(new URL(urlCheck[0])));
+ if (urlCheck?.length) {
+ const embed = await this.getEmbed(new URL(urlCheck[0]));
+ if (embed)
+ message.embeds.push(embed);
+ }
this.updateMessage(message);
},