Skip to content

Commit

Permalink
refactor: add dedicated argument for controlling when reads are ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
insertish committed Dec 1, 2023
1 parent b39a22b commit a6b6e23
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/classes/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,19 +645,21 @@ export class Channel {
* @param message Last read message or its ID
* @param skipRateLimiter Whether to skip the internal rate limiter
* @param skipRequest For internal updates only
* @param skipNextMarking For internal usage only
* @requires `SavedMessages`, `DirectMessage`, `Group`, `TextChannel`
*/
async ack(
message?: Message | string,
skipRateLimiter?: boolean,
skipRequest?: boolean
skipRequest?: boolean,
skipNextMarking?: boolean
) {
if (!message && this.#manuallyMarked) {
this.#manuallyMarked = false;
return;
}
// Skip the next unread marking
else if (message instanceof Message) {
else if (skipNextMarking) {
this.#manuallyMarked = true;
}

Expand Down

0 comments on commit a6b6e23

Please sign in to comment.