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:
Gus Caplan
2016-12-19 01:16:27 -06:00
committed by Schuyler Cebulskie
parent a0a3989e59
commit e392107369
3 changed files with 24 additions and 0 deletions

View File

@@ -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>