copy Copy chevron-down
API Reference Friendship Send, receive friend request, and friend confirmation events.
Send, receive friend request, and friend confirmation events.
receive request(in friend event)
confirmation friendship(friend event)
Examples/Friend-Botarrow-up-right
Kind : global class
friendship.accept() ⇒ Promise <void>
Accept Friend Request
Kind : instance method of Friendship
Example
friendship.hello() ⇒ string
Get verify message from
Kind : instance method of Friendship
Example (If request content is `ding`, then accept the friendship)
Get the contact from friendship
Kind : instance method of Friendship
Example
friendship.type() ⇒ FriendshipType
Return the Friendship Type
Tips: FriendshipType is enum here. </br>
Kind : instance method of Friendship
Example (If request content is `ding`, then accept the friendship)
Friendship.send()
Deprecated
use Friendship#add instead
Kind : static method of Friendship
Send a Friend Request to a contact with message hello.
The best practice is to send friend request once per minute. Remeber not to do this too frequently, or your account may be blocked.
Kind : static method of Friendship
Send friend request to contact
The friend request content
Example