chatterbox 1.0.1 copy "chatterbox: ^1.0.1" to clipboard
chatterbox: ^1.0.1 copied to clipboard

outdated

Framework to build dialog flows for Telegram Bots

Chatterbox is a simple framework to build multi level Telegram Bot dialog flows. It is build around televerse library.

Features #

Allows to process different kind of messages from user and reply to them within the given context

Getting started #

Can be used with both webhook and polling.

Usage #

Webhook with Cloud Functions #

@CloudFunction()
Future<void> function(Map<String, dynamic> updateJson) async {
  setTranslations(translations); //todo this is rubbish

  SharedDatabase.initialize();
  final store = ChatterboxStoreProxy(SharedDatabase.createDialogDao());
  final flows = <Flow>[
    LoginFlow(SharedDatabase.createTokenDao()),
  ];

  Chatterbox(SharedConfig.botToken, flows, store).invokeFromWebhook(updateJson);
}

Additional information #

3
likes
0
points
30
downloads

Publisher

verified publisherdevartel.io

Weekly Downloads

Framework to build dialog flows for Telegram Bots

Repository

License

unknown (license)

Dependencies

collection, televerse

More

Packages that depend on chatterbox