Skip to content

Update location broken? #239

@rengglian

Description

@rengglian

I have trouble updating the live location of my bot.
Send text and send location work as expected.

	go func() {
		var _tempMessage = &tb.Message{}
		for _botResponse := range botResponse {
			fmt.Println("AutoResponse")
			switch _botResponse.Reply {
			case "text":
				bot.Send(chatGroup, _botResponse.Msg.Text)
			case "location":
				_tempMessage, _ = bot.Send(chatGroup, _botResponse.Msg.Location)
			case "updateLocation":
				fmt.Println(_tempMessage.MessageSig())
				fmt.Println(tb.Location{Lat: _botResponse.Lat, Lng: _botResponse.Lng})
				bot.Edit(_tempMessage, tb.Location{Lat: _botResponse.Lat, Lng: _botResponse.Lng})
			default:
			}
		}
	}()

The console output shows the correct message and chat id.

Any ideas what is wrong?
If you need more information let me know

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions