chore: add channelExclusiveMuted option

This commit is contained in:
izzy
2025-09-12 19:22:33 +01:00
parent 219118b287
commit 1a33dd00aa
2 changed files with 19 additions and 2 deletions
+18 -1
View File
@@ -147,10 +147,18 @@ export type ClientOptions = Partial<EventClientOptions> & {
/**
* 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<Events> {
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,
};
+1 -1
View File
@@ -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;