$ go list -m github.com/gotd/td
github.com/gotd/td v0.116.0
Yes
Using basic example bot-echo
write to some old (2 month old for me) group (Supergroup)
Pong
Nothing in reply.
One string in debug:
bot_v3-1 | 2024-12-25T00:12:38.699Z DEBUG conn.mtproto mtproto/handle_message.go:19 Handle message {"v": "v0.116.0", "conn_id": 0, "dc_id": 2, "type_id": "0x74ae4240", "type_name": "updates#74ae4240", "size_bytes": 308, "msg_id": 7452135730304218113}
$ go version
go version go1.23.4 linux/amd64
go env
Output
$ go env GO111MODULE='' GOARCH='amd64' GOBIN='' GOCACHE='/root/.cache/go-build' GOENV='/root/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFLAGS='' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMODCACHE='/go/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/go' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/usr/local/go' GOSUMDB='sum.golang.org' GOTMPDIR='' GOTOOLCHAIN='local' GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.23.4' GODEBUG='' GOTELEMETRY='local' GOTELEMETRYDIR='/root/.config/go/telemetry' GCCGO='gccgo' GOAMD64='v1' AR='ar' CC='gcc' CXX='g++' CGO_ENABLED='0' GOMOD='/app/go.mod' GOWORK='' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' PKG_CONFIG='pkg-config' GOGCCFLAGS='-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build126182640=/tmp/go-build -gno-record-gcc-switches'
dispatcher.OnNewMessage() doesn't work with old groups but works with chats. If I try to use dispatcher.OnNewChannelMessage() it works for both channels and groups
I have another bot replying to messages (github.com/go-telegram-bot-api/telegram-bot-api) and have already attached to some old group. I tried to use its token, the same - old bot is working, echo_bot is not.
Bot details:
APP_ID and APP_HASH was created yesterday
Group details - test one was created 24 Oct, another - earlier.
New groups I created today is okay
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too