[Bot Service] Similar mechanism to v3's receive() method?

Germán Toro del Valle 1 Reputation point
2020-08-25T07:11:48.833+00:00

Hi guys,

Are you aware of some mechanism in the version 4 of the Bot Service Javascript SDK to be able to send a message from a dialog to a bot instance programmatically such as it was possible using the UniversalBot's receive() method, please see https://learn.microsoft.com/es-es/javascript/api/botbuilder/universalbot?view=botbuilder-ts-3.0#receive-ievent---ievent-----err--error-----void- ?

Thank you very much :)

Best,
Germán.

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
756 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Showndarya Madhavan 321 Reputation points
    2020-08-25T11:12:37.937+00:00

    Hi @Germán Toro del Valle ,

    UniversalBot class is not a part of the Bot SDK v4.

    You can check this link for transition from v3 to v4: https://learn.microsoft.com/en-us/azure/bot-service/migration/javascript-migration-quickreference?view=azure-bot-service-4.0

    The OnEvent method in ActivityHandler might be the one you are looking for: https://learn.microsoft.com/es-es/javascript/api/botbuilder-core/activityhandler?view=botbuilder-ts-latest#onevent-bothandler-

    Additionally, you can refer to this link to check which events are available for which channel: https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channels-reference?view=azure-bot-service-4.0

    Hope this helps!

    1 person found this answer helpful.
    0 comments No comments

  2. Germán Toro del Valle 1 Reputation point
    2020-08-26T09:19:56.557+00:00

    Thank you very much for your quick answer @Showndarya Madhavan :)

    I will investigate the ActivityHandler's onEvent() method option as well as the https://learn.microsoft.com/es-es/javascript/api/botbuilder-core/botframeworkclient?view=botbuilder-ts-latest one I just found :)

    Thank you very much!!!

    0 comments No comments