Giter VIP home page Giter VIP logo

bots-framework's Introduction

Strongo Bots Framework

A Go language framework to develop bots for messengers.

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 APIs.
  • i18n & l10n support (multilingual)
  • Can be hosted in cloud or just as a standard Go HTTP server. Supports AppEngine standard environment.
  • It's fast

Conitious Integration

CircleCI Go Report Card GoDoc

Usage

func InitBot(httpRouter *httprouter.Router, botHost bots.BotHost, appContext common.DebtsTrackerAppContext) {

	driver := bots.NewBotDriver( // Orchestrate requests to appropriate handlers
		bots.AnalyticsSettings{GaTrackingID: common.GA_TRACKING_ID}, // TODO: Refactor to list of analytics providers
		appContext,                                       // Holds User entity kind name, translator, etc.
		botHost,                                          // Defines how to create context.Context, HttpClient, DB, etc...
		"Please report any issues to @DebtsTrackerGroup", // Is it wrong place? Router has similar.
	)

	driver.RegisterWebhookHandlers(httpRouter, "/bot",
		telegram.NewTelegramWebhookHandler(
			telegramBotsWithRouter, // Maps of bots by code, language, token, etc...
			newTranslator, // Creates translator that gets a context.Context (for logging purpose)
		),
		viber.NewViberWebhookHandler(
			viber.Bots,
			newTranslator,
		),
		fbm.NewFbmWebhookHandler(
			fbm.Bots,
			newTranslator,
		),
	)
}

Sample bots built with Strongo Bots Framework

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

  • Bidding Tic-Tac-Toe - open source game right in your Telegram chat.
  • Rock-Paper-Scissors - open source game right in your Telegram chat.
  • Debtus.app — a bot & a reminder service that helps to track your debts & credits. Sends automated reminders to you & your debtors (in messenger, email, SMS).

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

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

Contributors

Press

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

Licensed under Apache 2.0 license

bots-framework's People

Contributors

trakhimenok avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.