botInfo

Returns bot information (result of GetMe) associated with this BehaviourContext, if available.

The value is lazily computed and cached by DefaultCustomBehaviourContextAndTypeReceiver when it is used to wrap behaviour handlers. If this context was not prepared by that wrapper, the function returns null.

Thread-safety:

  • The underlying retrieval is protected by a mutex to ensure the info is fetched at most once per context.

Return

ExtendedBot with bot details, or null if no bot info provider is registered in this context.