VoiceJoinMessages: Add option to ignore friends (#785)

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
Aaron Tulino 2026-02-17 10:15:20 -07:00 • committed by GitHub
parent 2737794e6e
commit e321795a02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,6 +45,11 @@ const settings = definePluginSettings({
description: "Comma or space separated list of friends' user IDs you want to recieve join messages from",
default: ""
},
ignoredFriends: {
type: OptionType.STRING,
description: "Comma or space separated list of friends' user IDs you do NOT want to recieve join messages from",
default: ""
},
ignoreBlockedUsers: {
type: OptionType.BOOLEAN,
description: "Do not send messages about blocked users joining/leaving/moving voice channels",
@ -89,9 +94,11 @@ function sendVoiceStatusMessage(channelId: string, content: string, userId: stri
function isFriendAllowlisted(friendId: string) {
if (!RelationshipStore.isFriend(friendId)) return false;
const list = settings.store.allowedFriends.split(",").join(" ").split(" ").filter(i => i.length > 0);
if (list.join(" ").length < 1) return true;
return list.includes(friendId);
const ignoreList = settings.store.ignoredFriends.split(",").join(" ").split(" ").filter(i => i.length > 0);
if (ignoreList.includes(friendId)) return false;
const allowList = settings.store.allowedFriends.split(",").join(" ").split(" ").filter(i => i.length > 0);
if (allowList.join(" ").length < 1) return true;
return allowList.includes(friendId);
}
// Blatantly stolen from VcNarrator plugin