25 lines
633 B
Go
25 lines
633 B
Go
|
package wizard
|
||
|
|
||
|
import (
|
||
|
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/handler/iface"
|
||
|
"github.com/mymmrac/telego"
|
||
|
tu "github.com/mymmrac/telego/telegoutil"
|
||
|
)
|
||
|
|
||
|
type HelpCommand struct {
|
||
|
UnknownCommand
|
||
|
}
|
||
|
|
||
|
func NewHelpCommand(app iface.App, userID, chatID int64) *HelpCommand {
|
||
|
return &HelpCommand{*NewUnknownCommand(app, userID, chatID)}
|
||
|
}
|
||
|
|
||
|
func (h *HelpCommand) Handle(wh telego.Update) error {
|
||
|
_, err := h.App.TG().SendMessage(&telego.SendMessageParams{
|
||
|
ChatID: tu.ID(wh.Message.Chat.ID),
|
||
|
Text: h.loc(wh.Message.From.LanguageCode).Message("help_output"),
|
||
|
ParseMode: telego.ModeMarkdown,
|
||
|
})
|
||
|
return err
|
||
|
}
|