go-tdlib icon indicating copy to clipboard operation
go-tdlib copied to clipboard

sendText example does not work

Open s3rj1k opened this issue 5 years ago • 8 comments

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

s3rj1k avatar Nov 21 '18 17:11 s3rj1k

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.

Arman92 avatar Nov 22 '18 11:11 Arman92

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

s3rj1k avatar Nov 22 '18 12:11 s3rj1k

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

zloiia avatar Nov 22 '18 15:11 zloiia

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

s3rj1k avatar Nov 22 '18 15:11 s3rj1k

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

halink0803 avatar Feb 04 '19 13:02 halink0803

@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.

halink0803 avatar Feb 04 '19 15:02 halink0803

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

akbwyfc avatar Oct 12 '19 08:10 akbwyfc

I installed go version 1.9 and solved.

akbwyfc avatar Oct 12 '19 09:10 akbwyfc