Giter Club home page Giter Club logo

gotgbot's Introduction

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 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!

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
    • Self-documenting (Re-uses pre-existing telegram docs)
  • Type safe; no weird interface{} logic, all types match the bot API docs.
  • No third party library bloat; only uses standard library.
  • Updates are each processed in their own go routine, encouraging concurrent processing, and keeping your bot responsive.
  • Code panics are 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.

Contributing

Contributions are welcome! More information on contributing can be found here.

Regenerating the generated code.

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.

gotgbot's People

Contributors

anonyindian avatar camelva avatar dhruvkelawala avatar itzkassem avatar jaskaransm avatar paulsonoflars avatar roj1512 avatar shabier avatar soekarnohatta avatar wemiprog 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.