lets all be friendly! (#809)

* lets all be friendly!

* fix doc

* Update ClientUser.js

* Update ClientUser.js
This commit is contained in:
Gus Caplan
2016-10-18 00:36:25 -05:00
committed by Schuyler Cebulskie
parent 2f2188fe60
commit 9c8eb2dfc3
4 changed files with 44 additions and 1 deletions

View File

@@ -126,6 +126,28 @@ class ClientUser extends User {
return this.setPresence({ afk });
}
/**
* Send a friend request
* <warn>This is only available for user accounts, not bot accounts!</warn>
* @param {UserResolvable} user The user to send the friend request to.
* @returns {Promise<User>} The user the friend request was sent to.
*/
addFriend(user) {
user = this.client.resolver.resolveUser(user);
return this.client.rest.methods.addFriend(user);
}
/**
* Remove a friend
* <warn>This is only available for user accounts, not bot accounts!</warn>
* @param {UserResolvable} user The user to remove from your friends
* @returns {Promise<User>} The user that was removed
*/
removeFriend(user) {
user = this.client.resolver.resolveUser(user);
return this.client.rest.methods.removeFriend(user);
}
/**
* Set the full presence of the current user.
* @param {Object} data the data to provide