mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
lets all be friendly! (#809)
* lets all be friendly! * fix doc * Update ClientUser.js * Update ClientUser.js
This commit is contained in:
committed by
Schuyler Cebulskie
parent
2f2188fe60
commit
9c8eb2dfc3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user