How to deal with client.API().MessagesGetBotCallbackAnswer error
What version of gotd are you using?
0.83
$ go list -m github.com/gotd/td
Can this issue be reproduced with the latest version?
yes
What did you do?
Call the callback button to get the returned string
channelID := mes.PeerID.ChannelID accessHash := e.Channels[channelID].AccessHash inputPeerChannel := &tg.InputPeerChannel{ ChannelID: channelID, AccessHash: accessHash, }
datares, err = client.API().MessagesGetBotCallbackAnswer(ctx, &tg.MessagesGetBotCallbackAnswerRequest{ Peer: inputPeerChannel, MsgID: mes.ID, Data: datax, Password: &tg.InputCheckPasswordSRP{}})
What did you expect to see?
Call the callback button to get the correct return string without reporting an error
What did you see instead?
--InputPeerChannel{ChannelID:1652601224 AccessHash:-8634917098673125051} --rpcDoRequest: rpc error code 400: CHANNEL_INVALID
Correct data cannot be returned when the AccessHash of Peer is negative
What Go version and environment are you using?
go version go1.20.5 windows/amd64
$ go version
set GO111MODULE=on set GOARCH=amd64 set GOBIN= set GOCACHE=E:\go\go-build-cache set GOENV=C:\Users\cbh\AppData\Roaming\go\env set GOEXE=.exe set GOEXPERIMENT= set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GOMODCACHE=E:\go\pkg\mod set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=E:\go set GOPRIVATE= set GOPROXY=https://goproxy.cn,direct set GOROOT=D:\Program Files\Go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=D:\Program Files\Go\pkg\tool\windows_amd64 set GOVCS= set GOVERSION=go1.20.5 set GCCGO=gccgo set GOAMD64=v1 set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=0 set GOMOD=NUL set GOWORK= set CGO_CFLAGS=-O2 -g set CGO_CPPFLAGS= set CGO_CXXFLAGS=-O2 -g set CGO_FFLAGS=-O2 -g set CGO_LDFLAGS=-O2 -g set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=C:\Users\cbh\AppData\Local\Temp\go-build1086603099=/tmp/go-build -gno-record-gcc-switches