this worked for me as said by dr mckay
client.on('friendRelationship', (friend, relationship) => {
if(relationship == SteamUser.EFriendRelationship.RequestRecipient) {
client.addFriend(friend);
message(friend, "Thanks for adding me, use !help to get started.");
community.postUserComment(friend,"Thanks for adding! Enjoy your stay and have a good Day!");
}});