From ae29ba140cd39221348a5ef390d8063f2c66895b Mon Sep 17 00:00:00 2001 From: EdVraz <88881326+EdVraz@users.noreply.github.com> Date: Wed, 21 Feb 2024 13:57:06 +0100 Subject: [PATCH] Add option to ignore yourself --- src/plugins/vcNarrator/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/vcNarrator/index.tsx b/src/plugins/vcNarrator/index.tsx index ac629e749..f3e236525 100644 --- a/src/plugins/vcNarrator/index.tsx +++ b/src/plugins/vcNarrator/index.tsx @@ -167,6 +167,7 @@ export default definePlugin({ for (const state of voiceStates) { const { userId, channelId, oldChannelId } = state; const isMe = userId === myId; + if (isMe && Settings.plugins.VcNarrator.ignoreSelf) return; if (!isMe) { if (!myChanId) continue; if (channelId !== myChanId && oldChannelId !== myChanId) continue; @@ -188,6 +189,7 @@ export default definePlugin({ }, AUDIO_TOGGLE_SELF_MUTE() { + if (Settings.plugins.VcNarrator.ignoreSelf) return; const chanId = SelectedChannelStore.getVoiceChannelId()!; const s = VoiceStateStore.getVoiceStateForChannel(chanId) as VoiceState; if (!s) return; @@ -197,6 +199,7 @@ export default definePlugin({ }, AUDIO_TOGGLE_SELF_DEAF() { + if (Settings.plugins.VcNarrator.ignoreSelf) return; const chanId = SelectedChannelStore.getVoiceChannelId()!; const s = VoiceStateStore.getVoiceStateForChannel(chanId) as VoiceState; if (!s) return; @@ -243,6 +246,11 @@ export default definePlugin({ markers: [0.1, 0.5, 1, 2, 5, 10], stickToMarkers: false }, + ignoreSelf: { + type: OptionType.BOOLEAN, + description: "Do not say your own actions", + default: false + }, sayOwnName: { description: "Say own name", type: OptionType.BOOLEAN,