usdevs / cinnabot

MIT License
2 stars 5 forks source link

Added support for inline buttons #41

Closed mitchellkwong closed 5 years ago

mitchellkwong commented 5 years ago

Description

Callbacks

main.go

Motivation and Context

Callback handling is a necessary part of using inline buttons in telegram (the buttons that stick below messages like in Countmeinbot)

It lays the groundwork for refreshing bus timings (https://github.com/usdevs/cinnabot/issues/34) and any future changes using inline buttons.

How Has This Been Tested?

An edited version of travel.go from was used to add a refresh button to the bus timing messages which send dummy data to be handled by callbacks. The Handle method successfully output to log upon receiving the data.

Screenshots (if appropriate):

Types of changes

Checklist:

hongshaoyang commented 5 years ago

waseh!!