项目作者: strongo

项目描述 :
Golang framework to build multilingual bots for messengers (Telegram, FB Messenger, Skype, Line, Kik, WeChat) hosted on AppEngine, Amazon, Azure, Heroku or standalone
高级语言: Go
项目地址: git://github.com/strongo/bots-framework.git
创建时间: 2016-04-30T13:10:06Z
项目社区:https://github.com/strongo/bots-framework

开源协议:Apache License 2.0

下载


🏋️ Strongo Bots Go Framework

A Go language framework to develop bots for messengers.

Developed & shared by Sneat-co & Strongo teams
with usage of dalgo library.

Reasons to use:

  • Same code can work across different messenger (Telegram, Facebook Messenger, Viber, Skype, Line, Kik, WeChat, etc.)
  • You can tune your code to a specific messenger’s UX.
  • i18n & l10n support (multilingual)
  • Can be hosted in cloud or just as a standard Go HTTP server. Supports AppEngine
    standard environment.
  • It’s fast

♺ Continuous Integration

Build and Test
Go Report Card
GoDoc
Coverage Status - help with code coverage
needed.

🍿 Usage

  1. func InitBot(httpRouter HttpRouter, botHost bots.BotHost, appContext common.DebtsTrackerAppContext) {
  2. driver := bots.NewBotDriver( // Orchestrate requests to appropriate handlers
  3. bots.AnalyticsSettings{GaTrackingID: common.GA_TRACKING_ID}, // TODO: Refactor to list of analytics providers
  4. appContext, // Holds User entity kind name, translator, etc.
  5. botHost, // Defines how to create context.Context, HttpClient, DB, etc...
  6. "Please report any issues to @DebtsTrackerGroup", // Is it wrong place? Router has similar.
  7. )
  8. driver.RegisterWebhookHandlers(httpRouter, "/bot",
  9. telegram.NewTelegramWebhookHandler(
  10. telegramBotsWithRouter, // Maps of bots by code, language, token, etc...
  11. newTranslator, // Creates translator that gets a context.Context (for logging purpose)
  12. ),
  13. viber.NewViberWebhookHandler(
  14. viber.Bots,
  15. newTranslator,
  16. ),
  17. fbm.NewFbmWebhookHandler(
  18. fbm.Bots,
  19. newTranslator,
  20. ),
  21. )
  22. }

🤖 Sample bots built with Strongo Bots Framework

The best way to learn is to see examples of usage. Here is few:

We would be happy to place a link to your example / bot that is implemented using this framework.

📦 Go API libraries used by the framework to talk to messengers

You can use any Bot API library by implementing couple of simple interface but the framework comes with few buildins:

📦 Other Go libraries used by the bot framework

  • dal-go/dalgo - Database abstraction layer (DAL) in Go language
  • strongo/gamp - Golang buffered client for Google Analytics (GA) Measurement
    Protocol

Can I use — features cross-table for bot messenger APIs

We are building a cross-table of features supported by different bot APIs.

Database Abstraction Layer (DAL)

Thanks to dalgo library the framework can work with different databases.
The Db structure is described in README-DB.md.

🫂 Contributors

📰 Press

There are no articles about the Strongo Bots Framework just yet. Send us a link if you find such.

📜 License

Licensed under Apache 2.0 license