ClientFriendManager - antilandjs/antiland.js GitHub Wiki

The manager for any and all, cached or uncached, users that are friends with the client user.

extends FriendManager

Properties

.pending : object

Responsible for caching incoming and outgoing friend requests.

Methods

.accept(userId) : Promise<boolean>

Accept an incoming friend request.

Name Type Optional
userId string No

.isPaired(userId) : Promise<boolean | string>

Check whether a user is your friend.

Name Type Optional
userId string No

.request(userId, check) : Promise<boolean | string>

Send a friend request to a user.

Name Type Optional
userId string No
check boolean Yes

.reject(userId) : Promise<boolean>

Reject an incoming friend request.

Name Type Optional
userId string No

.remove(userId) : Promise<boolean>

Remove a user from your list of friends.

Name Type Optional
userId string No