feat: <Message>.markUnread() #65

and script check update module .-.
This commit is contained in:
March 7th
2022-04-29 12:35:28 +07:00
parent c7cc764718
commit 615c772280
5 changed files with 3970 additions and 370 deletions

View File

@@ -992,6 +992,26 @@ class Message extends Base {
});
}
// Added
/**
* Marks the message as unread.
* @returns {boolean}
*/
async markUnread() {
await this.client.api.channels[this.channelId].messages[this.id].ack({
usingApplicationJson: true,
data: {
manual: true,
mention_count:
this.mentions.everyone ||
this.mentions.repliedUser?.id === this.client.user.id ||
this.mentions.users.has(this.client.user.id) ||
(this.guildId && this.mentions.roles.some(r => this.guild.me._roles?.includes(r.id)))
? 1
: 0,
},
});
return true;
}
/**
* Click specific button [Suggestion: Dux#2925]
* @param {string<Button.customId>} buttonID Button ID