Merge pull request #218 from Mantou1233/patch-1

feat(RelationshipsManager): new cancelFriendRequest method
This commit is contained in:
Cinnamon 2022-07-19 17:54:29 +07:00 committed by GitHub
commit 535e3b81ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,16 @@ class RelationshipsManager {
return true; return true;
} }
/**
* Cancels a friend request.
* @param {Snowflake} snowflake Snowflake of the user you want to delete
* @returns {Promise<boolean>}
*/
async cancelFriendRequest(id) {
await this.client.api.users['@me'].relationships[id].delete();
return true;
}
/** /**
* Accepts a friend request. * Accepts a friend request.
* @param {UserResolvable} user The user to add as a friend * @param {UserResolvable} user The user to add as a friend