Fix Multiple Popups VCSupport

This commit is contained in:
thororen1234 2024-07-28 21:29:36 -04:00
parent ac4a461bcf
commit c975439e9a

View file

@ -141,6 +141,8 @@ const settings = definePluginSettings({}).withPrivateSettings<{
dismissedDevBuildWarning?: boolean;
}>();
let clicked = false;
export default definePlugin({
name: "SupportHelper",
required: true,
@ -177,7 +179,9 @@ export default definePlugin({
async CHANNEL_SELECT({ channelId }) {
if (!SUPPORT_CHANNEL_IDS.includes(channelId)) return;
if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport")) return Alerts.show({
if (channelId === VC_SUPPORT_CHANNEL_ID && Vencord.Plugins.isPluginEnabled("VCSupport") && !clicked) {
clicked = true;
return Alerts.show({
title: "You are entering the support channel!",
body: <div>
<style>
@ -189,6 +193,7 @@ export default definePlugin({
<Forms.FormText>issue could be caused by Equicord!</Forms.FormText>
</div>
});
}
const selfId = UserStore.getCurrentUser()?.id;
if (!selfId || isPluginDev(selfId) || isEquicordPluginDev(selfId)) return;