Fires when a user adds your bot from their device. From this point on the user can exchange messages with it.
π‘ Joining and starting are separate events. A user who joins then blocks and re-enables the bot will produce userStoppedBot and userStartedBot without joining again.
Event
method is "userJoinedBot".Field | Type | Returned | Description |
method | String | Yes | "userJoinedBot" |
user | Yes | The user who joined. |
Preconditions
None. This event is delivered to every bot.
SDKs
SDK | Callback |
Java | onUserJoinedBot(User user) |
JavaScript | onUserJoinedBot(user) |
Python | on_user_joined_bot(self, user) |
Example
Event
json{ "method": "userJoinedBot", "user": { "id": "90089584801498185" } }