Update Plugin Name Check

This commit is contained in:
thororen1234 2025-07-12 14:43:29 -04:00
parent 35222b9292
commit 55bcba21fa
No known key found for this signature in database

View file

@ -322,7 +322,7 @@ export default definePlugin({
&& ((props.channel.id === SUPPORT_CHANNEL_ID && equicordSupport))
&& props.message.content?.includes("update");
const contentWords = (props.message.content?.toLowerCase().match(/\b\w+\b/g) ?? []);
const contentWords = (props.message.content?.toLowerCase().match(/`\w+`/g) ?? []).map(e => e.slice(1, -1));
const matchedPlugins = Object.keys(Vencord.Plugins.plugins).filter(name => contentWords.includes(name.toLowerCase()));
const matchedPlugin = matchedPlugins.sort((a, b) => b.length - a.length)[0];
const pluginData = matchedPlugin && Vencord.Plugins.plugins[matchedPlugin];