vegapokerbot/internal/handler/chat/poll.go

29 lines
714 B
Go

package chat
import (
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/handler/iface"
"github.com/mymmrac/telego"
tu "github.com/mymmrac/telego/telegoutil"
)
type Poll struct {
iface.Base
}
func NewPoll(app iface.App, userID, chatID int64) *Poll {
return &Poll{iface.NewBase(app, userID, chatID)}
}
func (h *Poll) Handle(wh telego.Update) error {
if wh.Message.Chat.Type == telego.ChatTypePrivate {
_, err := h.App.TG().SendMessage(&telego.SendMessageParams{
ChatID: tu.ID(wh.Message.Chat.ID),
Text: h.Localizer(wh.Message.From.LanguageCode).Message("use_this_command_in_group"),
ParseMode: telego.ModeMarkdown,
})
return err
}
// @todo implement poker polls.
return nil
}