https://github.com/bots-go-framework/bots-fw-telegram
Telegram module for Strongo bots framework
https://github.com/bots-go-framework/bots-fw-telegram
Last synced: 7 days ago
JSON representation
Telegram module for Strongo bots framework
- Host: GitHub
- URL: https://github.com/bots-go-framework/bots-fw-telegram
- Owner: bots-go-framework
- License: mit
- Created: 2023-04-03T08:42:56.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-01T07:31:57.000Z (about 1 month ago)
- Last Synced: 2026-01-06T03:13:07.789Z (about 1 month ago)
- Language: Go
- Size: 271 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bots-fw-telegram
Telegram module for Strongo bots framework
## Structure & key concepts
The [`tgWebhookHandler`](tg_webhook_handler.go) struct is implementing `botsfw.WebhookHandler` interface
and is an entry point for all incoming requests from Telegram. To create it you need to call
[`NewTgWebhookHandler()`](tg_webhook_handler.go) function.
### Registering records maker
```go
```
## Setting up dev environment for Telegram bots development
## Tunneling to local development environment
To expose local server to the Internet we use [ngrok](https://ngrok.com/).
```shell
ngrok http 4300
```
Make sure that you have started local GAE server & Firestore emulators - follow instructions
from [README.md](README.md).
After `ngrok` started you will see something like:
```shell
Forwarding https://****-***-**.ngrok-free.app -> http://localhost:4300
```
You would need to register the forwarding URL for bot you are testing with Telegram by calling this url:
`https://****-***-**.ngrok-free.app/bot/tg/set-webhook?code=BOT_CODE`
where `****-***-**` is the forwarding URL from `ngrok` output and `BOT_CODE` is the code of the bot you are testing.
The bot will be registered using secret tokens that you should set using environment variables:
```shell
TELEGRAM_BOT_TOKEN_=
```
You can create a personal bot for testing purposes using [BotFather](https://t.me/botfather).
The bot with the given code should be registered in your app and the value is CASE SENSITIVE.