friendship_offer

From SmartBots Developers Docs
Bot PlaygroundEvents
Revision as of 16:32, 17 October 2022 by Gg (Talk | contribs)

Jump to: navigation, search

Fires when bot receives a friendship offer

Bot.on("friendship_offer", function(event) { ... });


Reference

This event comes with the following event object:

Variable Required Description
event object properties:
avatar_name name of the sender
avatar_uuid UUID of the sender
message Text message sent along with the offer
session_id Session UUID to accept an offer.

See also

[Bot_Playground/Commands/acceptFriendshipOffer|acceptFriendshipOffer] command.

Example

Bot.on("friendship_offer", function(event) {
	console.log(`${event.avatar_name} offer friendship and says: ${event.message}`);
});

console.log("Bot is listening to friendship offers");