diff --git a/src/equicordplugins/instantScreenshare/index.tsx b/src/equicordplugins/instantScreenshare/index.tsx index 467a66b0..2df7344f 100644 --- a/src/equicordplugins/instantScreenshare/index.tsx +++ b/src/equicordplugins/instantScreenshare/index.tsx @@ -8,7 +8,7 @@ import { definePluginSettings } from "@api/Settings"; import { Devs, EquicordDevs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; import { findByCode, findByProps } from "@webpack"; -import { ChannelStore, SelectedChannelStore, UserStore } from "@webpack/common"; +import { ChannelStore, PermissionsBits, PermissionStore, SelectedChannelStore, UserStore } from "@webpack/common"; import { VoiceState } from "@webpack/types"; const settings = definePluginSettings({ @@ -41,6 +41,8 @@ async function startStream() { if (!selected) return; const channel = ChannelStore.getChannel(selected); + if (!PermissionStore.can(PermissionsBits.STREAM, channel)) return; + if (settings.store.streamType === "screen") { sources = await getDesktopSources(mediaEngine, ["screen"], null); source = sources[0];