mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
add ClientUser#fetchMentions (#999)
* add ClientUser#fetchMentions Signed-off-by: Gus Caplan <gus@localhost.localdomain> * ugh * Update ClientUser.js * Update ClientUser.js * Update ClientUser.js
This commit is contained in:
committed by
Schuyler Cebulskie
parent
a0a3989e59
commit
e392107369
@@ -146,6 +146,19 @@ class ClientUser extends User {
|
||||
return this.setPresence({ afk });
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches messages that mentioned the client's user
|
||||
* @param {Object} [options] Options for the fetch
|
||||
* @param {number} [options.limit=25] Maximum number of mentions to retrieve
|
||||
* @param {boolean} [options.roles=true] Whether to include role mentions
|
||||
* @param {boolean} [options.everyone=true] Whether to include everyone/here mentions
|
||||
* @param {Guild|string} [options.guild] Limit the search to a specific guild
|
||||
* @returns {Promise<Message[]>}
|
||||
*/
|
||||
fetchMentions(options = { limit: 25, roles: true, everyone: true, guild: null }) {
|
||||
return this.client.rest.methods.fetchMentions(options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a friend request
|
||||
* <warn>This is only available when using a user account.</warn>
|
||||
|
||||
Reference in New Issue
Block a user