Compare commits

..

2 commits

Author SHA1 Message Date
sadan4
5b2a98ce0e
Merge e392958736 into 00c9aa96aa 2024-09-19 09:44:31 +01:00
Nuckyz
00c9aa96aa
UserVoiceShow: Fix setting name 2024-09-19 05:25:31 -03:00

View file

@ -32,7 +32,7 @@ const settings = definePluginSettings({
default: true, default: true,
restartNeeded: true restartNeeded: true
}, },
showInVoiceMemberList: { showInMemberList: {
type: OptionType.BOOLEAN, type: OptionType.BOOLEAN,
description: "Show a user's Voice Channel indicator in the member and DMs list", description: "Show a user's Voice Channel indicator in the member and DMs list",
default: true, default: true,
@ -82,12 +82,12 @@ export default definePlugin({
match: /\.subtext,children:.+?}\)\]}\)(?=])/, match: /\.subtext,children:.+?}\)\]}\)(?=])/,
replace: "$&,$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id})" replace: "$&,$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id})"
}, },
predicate: () => settings.store.showInVoiceMemberList predicate: () => settings.store.showInMemberList
} }
], ],
start() { start() {
if (settings.store.showInVoiceMemberList) { if (settings.store.showInMemberList) {
addDecorator("UserVoiceShow", ({ user }) => user == null ? null : <VoiceChannelIndicator userId={user.id} />); addDecorator("UserVoiceShow", ({ user }) => user == null ? null : <VoiceChannelIndicator userId={user.id} />);
} }
}, },