From 1a33dd00aa23a4543fe6e7ac3dc062e99c2842c8 Mon Sep 17 00:00:00 2001 From: izzy Date: Fri, 12 Sep 2025 19:22:33 +0100 Subject: [PATCH] chore: add `channelExclusiveMuted` option --- src/Client.ts | 19 ++++++++++++++++++- src/classes/Channel.ts | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/Client.ts b/src/Client.ts index fc697afe..f11846b5 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -147,10 +147,18 @@ export type ClientOptions = Partial & { /** * Check whether a channel is muted * @param channel Channel - * @return Whether it is muted + * @return Whether it is muted or through inheritance * @default false */ channelIsMuted(channel: Channel): boolean; + + /** + * Check whether a channel is exclusively muted (irrespective of server) + * @param channel Channel + * @return Whether it is exclusively muted + * @default false + */ + channelExclusiveMuted(channel: Channel): boolean; }; /** @@ -213,6 +221,15 @@ export class Client extends AsyncEventEmitter { channelIsMuted() { return false; }, + /** + * Check whether a channel is exclusively muted (irrespective of server) + * @param channel Channel + * @return Whether it is exclusively muted + * @default false + */ + channelExclusiveMuted() { + return false; + }, ...options, }; diff --git a/src/classes/Channel.ts b/src/classes/Channel.ts index e1995f18..eb7b4917 100644 --- a/src/classes/Channel.ts +++ b/src/classes/Channel.ts @@ -292,7 +292,7 @@ export class Channel { !this.lastMessageId || this.type === "SavedMessages" || this.type === "VoiceChannel" || - this.#collection.client.options.channelIsMuted(this) + this.#collection.client.options.channelExclusiveMuted(this) ) return false;