Autogenerated Go wrapper for the telegram API. Inspired by the python-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 provide update processing out of the box.
All the telegram types and methods are generated from
a bot api spec. These are generated in the gen_*.go
files.
If you have any questions, come find us in our telegram support chat!
Download the library with the standard go get
command:
go get github.com/PaulSonOfLars/gotgbot/v2
Sample bots can be found in the samples directory.
Some recommended bots to look at:
Docs can be found here.
Contributions are welcome! More information on contributing can be found here.
If you've made changes to the code generation, you will probably need to regenerate the library code.
This can be done simply by running go generate
from the repo root. Running this will generate the code from the
specification repo at the commit pinned in the spec_commit
file.
To upgrade the commit in spec_commit
and regenerate your code, simply run GOTGBOT_UPGRADE=true go generate
.
This will fetch the latest commit sha, and regenerate the library against that, giving you the latest version
available.