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 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

{
  "method": "userJoinedBot",
  "user": {
    "id": "90089584801498185"
  }
}