0
0
mirror of https://github.com/crazy-max/diun.git synced 2024-12-22 11:28:28 +00:00
crazy-max_diun/vendor/github.com/PaulSonOfLars/gotgbot/v2
dependabot[bot] 64f77319b2
chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2
Bumps [github.com/PaulSonOfLars/gotgbot/v2](https://github.com/PaulSonOfLars/gotgbot) from 2.0.0-rc.27 to 2.0.0-rc.30.
- [Release notes](https://github.com/PaulSonOfLars/gotgbot/releases)
- [Commits](https://github.com/PaulSonOfLars/gotgbot/compare/v2.0.0-rc.27...v2.0.0-rc.30)

---
updated-dependencies:
- dependency-name: github.com/PaulSonOfLars/gotgbot/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-14 23:37:14 +00:00
..
.gitignore chore: go mod vendor 2024-12-14 22:30:21 +01:00
.golangci.yaml chore: go mod vendor 2024-12-14 22:30:21 +01:00
bot.go chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00
custom_helpers.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
entities.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
file.go chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00
formatting.go chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00
gen_consts.go chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00
gen_helpers.go chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00
gen_methods.go chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00
gen_types.go chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00
LICENSE chore: go mod vendor 2024-12-14 22:30:21 +01:00
README.md chore: go mod vendor 2024-12-14 22:30:21 +01:00
request.go chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00
sender.go chore: go mod vendor 2024-12-14 22:30:21 +01:00
spec_commit chore(deps): bump github.com/PaulSonOfLars/gotgbot/v2 2024-12-14 23:37:14 +00:00

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.

Some recommended bots to look at:

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.