1234567891011121314151617181920212223242526272829 |
- package tg
- import (
- tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
- )
- type Location = tgbotapi.Location
- type LocationCompo struct {
- MessageCompo
- Location
- }
- func (compo *LocationCompo) SendConfig(
- sid SessionID, bot *Bot,
- ) (SendConfig) {
- cid := sid.ToAPI()
- location := tgbotapi.NewLocation(
- cid,
- compo.Latitude,
- compo.Longitude,
- )
- ret := SendConfig{}
- ret.Chattable = location
- return ret
- }
|