add way more friend shit (#815)

This commit is contained in:
Gus Caplan
2016-10-22 15:25:55 -05:00
committed by Schuyler Cebulskie
parent 9f7c630796
commit 422b90c711
9 changed files with 106 additions and 3 deletions

View File

@@ -135,6 +135,38 @@ class User {
return this.client.rest.methods.deleteChannel(this);
}
/**
* Sends a friend request to the user
* @returns {Promise<User>}
*/
addFriend() {
return this.client.rest.methods.addFriend(this);
}
/**
* Removes the user from your friends
* @returns {Promise<User>}
*/
removeFriend() {
return this.client.rest.methods.removeFriend(this);
}
/**
* Blocks the user
* @returns {Promise<User>}
*/
block() {
return this.client.rest.methods.blockUser(this);
}
/**
* Unblocks the user
* @returns {Promise<User>}
*/
unblock() {
return this.client.rest.methods.unblockUser(this);
}
/**
* Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.
* It is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.