Neur0toxine
77eaceb152
All checks were successful
continuous-integration/drone/push Build is passing
32 lines
836 B
Go
32 lines
836 B
Go
package wizard
|
|
|
|
import (
|
|
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/fsm"
|
|
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/handler/iface"
|
|
)
|
|
|
|
const AddChatMemberStateID fsm.StateID = "add_chat_member"
|
|
|
|
type AddChatMemberState struct {
|
|
State
|
|
}
|
|
|
|
func NewAddChatMemberState(app iface.App) fsm.IState[Wizard] {
|
|
return &AddChatMemberState{newBase(app)}
|
|
}
|
|
|
|
func (s *AddChatMemberState) Enter(pl *Wizard, mc fsm.MachineControls[*Wizard]) error {
|
|
if pl.Data.MyChatMember == nil {
|
|
_ = mc.Move(WaitingForMemberWebhookStateID, pl)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (s *AddChatMemberState) Handle(pl *Wizard, mc fsm.MachineControls[*Wizard]) {
|
|
// todo: copy implementation from func (h *ChatMemberUpdatedHandler) handleAddToChat(tgChat telego.Chat) error
|
|
}
|
|
|
|
func (s *AddChatMemberState) ID() fsm.StateID {
|
|
return AddChatMemberStateID
|
|
}
|