Arman92 / go-tdlib

Golang Telegram TdLib JSON bindings
GNU General Public License v3.0
436 stars 100 forks source link

sendText example does not work #9

Open s3rj1k opened 5 years ago

s3rj1k commented 5 years ago

error message is error! code: %!d(float64=5) msg: Chat not found

Arman92 commented 5 years ago

sendText example tries to send text messages to Foursquare bot So if you do not have it in your chats list, you can't send a message to it.

I think it's better to fisrt get the chats list (check out getChats example) then try sending your message to one your chats.

s3rj1k commented 5 years ago

It does not mater to what ID i try to send, I was tying to send to myself

zloiia commented 5 years ago

Just checked - it works. @s3rj1k are you shure you exactly set ID of chat with you. Not your userID

s3rj1k commented 5 years ago

100% sure, does not work for any of the chatIDs provided by getChats

halink0803 commented 5 years ago

I cannot make the send text example work somehow. Any help here?

halink0803 commented 5 years ago

@s3rj1k I checked message sent from SendMessage method, its state will be messageStatePending. You need to use GetUpdateChannel to get it from pending state then it will be sent.

akbwyfc commented 5 years ago

Hi I receive undefined sync.Map when trying to download: go get github/Arman92/go-tdlib Thanks in advance.

akbwyfc commented 5 years ago

I installed go version 1.9 and solved.