Platforms#

A chatbot has to interact with the users through some communication channel. BBF’s platforms wrap all the necessary code to build the connection between the bot and a communication channel.

All platforms implement the abstract class Platform. It defines the methods any platform must have. So, if you would like to create your own platform (and contribute to the BBF development 🙂), it must implement them according to the platform needs:

  • initialize(): Initialize the platform. It is called internally when you run the bot (Bot.run()). You may need to set some things previously to the platform execution.

  • start(): Start the platform execution. It is called internally when you run the bot (Bot.run()).

  • stop(): Stop the platform. It is called internally when you stop the bot (Bot.stop()).

  • _send(): Send a payload (usually a message) to the user. This is a private method. It is called internally by other platform methods, such as the following one.

  • reply(): Send a textual message to the user.

Additionally, a platform could have specific methods for it, as you can see in our implemented platforms.

Table of contents#