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) {
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue