mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-18 00:16:14 -04:00
chore: add channelExclusiveMuted option
This commit is contained in:
+18
-1
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user