Popularity
5.3
Growing
Activity
7.3
-
228
9
34

Programming language: Go
Tags: Third-party APIs    
Latest version: v2.0.2

tbot alternatives and similar packages

Based on the "Third-party APIs" category

Do you think we are missing an alternative of tbot or a related project?

Add another 'Third-party APIs' Package

README

tbot - Telegram Bot Server GoDoc Go Report Card GitHub Actions

Note: this is tbot v2, you can find v1 here.

Features

  • Full Telegram Bot API 4.3 support
  • Zero dependency
  • Type-safe API client with functional options
  • Capture messages by regexp
  • Middlewares support
  • Can be used with go modules
  • Support for external logger
  • MIT licensed

Installation

With go modules:

go get github.com/yanzay/tbot/v2

Without go modules:

go get github.com/yanzay/tbot

Support

Join telegram group to get support or just to say thank you.

Usage

Simple usage example:

package main

import (
    "log"
    "os"
    "time"

    "github.com/yanzay/tbot/v2"
)

func main() {
    bot := tbot.New(os.Getenv("TELEGRAM_TOKEN"))
    c := bot.Client()
    bot.HandleMessage(".*yo.*", func(m *tbot.Message) {
        c.SendChatAction(m.Chat.ID, tbot.ActionTyping)
        time.Sleep(1 * time.Second)
        c.SendMessage(m.Chat.ID, "hello!")
    })
    err := bot.Start()
    if err != nil {
        log.Fatal(err)
    }
}

Examples

Please take a look inside examples folder.


*Note that all licence references and agreements mentioned in the tbot README section above are relevant to that project's source code only.