Skip to content

Autogenerated Go wrapper for the telegram API. Inspired by the python-telegram-bot library.

License

Notifications You must be signed in to change notification settings

SvalkaForkov/gotgbot

Repository files navigation

Golang Telegram Bot library

Heavily inspired by the python-telegram-bot library, this package is a code-generated wrapper for the telegram bot api. We also provide an extensions package which defines an updater/dispatcher pattern to avoid having to rewrite update processing.

All the telegram types and methods are present in the gen_*.go files. These are all generated from a bot api spec and can be recreated by running go generate in the repo root. This makes it extremely easy to update the library; simply download the latest spec, and regenerate.

If you have any questions, come find us in our telegram support chat!

Features:

  • All telegram API types and methods are generated from the bot api docs, which makes this library:
    • Guaranteed to match the docs
    • Easy to update
  • Type safe; no weird interface{} logic.
  • No unnecessary third party libraries; only uses standard library.
  • Updates are each processed in their own go routine, keeping your bot responsive.
  • Code panics automatically recovered from and logged, avoiding unexpected downtime.

Getting started

Download the library with the standard go get command:

go get github.com/PaulSonOfLars/gotgbot@v2

Example bots

Sample bots can be found in the samples directory.

Docs

Docs can be found here.

About

Autogenerated Go wrapper for the telegram API. Inspired by the python-telegram-bot library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.6%
  • Shell 0.4%