mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 09:56:24 +00:00
Add option to ignore yourself
This commit is contained in:
parent
8b6a40311b
commit
ae29ba140c
1 changed files with 8 additions and 0 deletions
|
@ -167,6 +167,7 @@ export default definePlugin({
|
||||||
for (const state of voiceStates) {
|
for (const state of voiceStates) {
|
||||||
const { userId, channelId, oldChannelId } = state;
|
const { userId, channelId, oldChannelId } = state;
|
||||||
const isMe = userId === myId;
|
const isMe = userId === myId;
|
||||||
|
if (isMe && Settings.plugins.VcNarrator.ignoreSelf) return;
|
||||||
if (!isMe) {
|
if (!isMe) {
|
||||||
if (!myChanId) continue;
|
if (!myChanId) continue;
|
||||||
if (channelId !== myChanId && oldChannelId !== myChanId) continue;
|
if (channelId !== myChanId && oldChannelId !== myChanId) continue;
|
||||||
|
@ -188,6 +189,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
|
|
||||||
AUDIO_TOGGLE_SELF_MUTE() {
|
AUDIO_TOGGLE_SELF_MUTE() {
|
||||||
|
if (Settings.plugins.VcNarrator.ignoreSelf) return;
|
||||||
const chanId = SelectedChannelStore.getVoiceChannelId()!;
|
const chanId = SelectedChannelStore.getVoiceChannelId()!;
|
||||||
const s = VoiceStateStore.getVoiceStateForChannel(chanId) as VoiceState;
|
const s = VoiceStateStore.getVoiceStateForChannel(chanId) as VoiceState;
|
||||||
if (!s) return;
|
if (!s) return;
|
||||||
|
@ -197,6 +199,7 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
|
|
||||||
AUDIO_TOGGLE_SELF_DEAF() {
|
AUDIO_TOGGLE_SELF_DEAF() {
|
||||||
|
if (Settings.plugins.VcNarrator.ignoreSelf) return;
|
||||||
const chanId = SelectedChannelStore.getVoiceChannelId()!;
|
const chanId = SelectedChannelStore.getVoiceChannelId()!;
|
||||||
const s = VoiceStateStore.getVoiceStateForChannel(chanId) as VoiceState;
|
const s = VoiceStateStore.getVoiceStateForChannel(chanId) as VoiceState;
|
||||||
if (!s) return;
|
if (!s) return;
|
||||||
|
@ -243,6 +246,11 @@ export default definePlugin({
|
||||||
markers: [0.1, 0.5, 1, 2, 5, 10],
|
markers: [0.1, 0.5, 1, 2, 5, 10],
|
||||||
stickToMarkers: false
|
stickToMarkers: false
|
||||||
},
|
},
|
||||||
|
ignoreSelf: {
|
||||||
|
type: OptionType.BOOLEAN,
|
||||||
|
description: "Do not say your own actions",
|
||||||
|
default: false
|
||||||
|
},
|
||||||
sayOwnName: {
|
sayOwnName: {
|
||||||
description: "Say own name",
|
description: "Say own name",
|
||||||
type: OptionType.BOOLEAN,
|
type: OptionType.BOOLEAN,
|
||||||
|
|
Loading…
Reference in a new issue