feat: add "Ignore Bots" setting in Boo plugin (#521)

* feat: add "Ignore Bots" setting in Boo plugin

* t

---------

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
9gvuwu 2025-11-26 22:34:55 +01:00 • committed by GitHub
parent 38e89b9789
commit 526fbb791c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View file

@ -163,8 +163,8 @@ export function Boo({ channel }: { channel: Channel; }) {
return;
}
// if exempted, remove from ghost tracking
if (isExempted) {
// if exempted or bot (if setting enabled), remove from ghost tracking
if (isExempted || (settings.store.ignoreBots && lastMessage.author.bot)) {
if (countedChannels.has(id)) {
countedChannels.delete(id);
setBooCount(getBooCount() - 1);
@ -186,7 +186,7 @@ export function Boo({ channel }: { channel: Channel; }) {
}
}, [state.isCurrentUser, state.isDataProcessed, id, lastMessage?.id]);
if (!state.isDataProcessed || !currentUserId || !lastMessage || state.isCurrentUser || isChannelExempted(id) || isCleared)
if (!state.isDataProcessed || !currentUserId || !lastMessage || state.isCurrentUser || isChannelExempted(id) || isCleared || (settings.store.ignoreBots && lastMessage.author.bot))
return null;
if (!settings.store.showDmIcons) return null;

View file

@ -84,6 +84,12 @@ export const settings = definePluginSettings({
description: "Something might happen if you ignore someone for too long...",
default: false,
restartNeeded: false
},
ignoreBots: {
type: OptionType.BOOLEAN,
description: "Ignore DMs from bots",
default: true,
restartNeeded: false
}
});

View file

@ -632,7 +632,7 @@ export const Devs = /* #__PURE__*/ Object.freeze({
alfred: {
name: "alfred",
id: 1038466644353232967n
}
},
} satisfies Record<string, Dev>);
export const EquicordDevs = Object.freeze({
@ -1205,7 +1205,7 @@ export const EquicordDevs = Object.freeze({
name: "neoarz",
id: 1015372540937502851n
},
KamiRu:{
KamiRu: {
name: "KamiRu",
id: 819191621676695563n
},