This commit is contained in:
Artem Tsyrulnikov
2026-01-18 13:59:47 +03:00
parent d8202e1141
commit 62e8f98429
62 changed files with 156 additions and 190 deletions

23
tg_bot/bot/state.go Normal file
View File

@@ -0,0 +1,23 @@
package bot
import "github.com/NicoNex/echotron/v3"
type RenderMode int
const (
NewMessage RenderMode = iota
EditMessage
)
type State interface {
Enter(*Bot, RenderMode)
HandleCallback(*Bot, *echotron.Update)
HandleMessage(*Bot, *echotron.Update)
Handle(*Bot, *echotron.Update)
Exit() // Вызывается при выходе из состояния для cleanup (например, отмены горутин)
}
type Session struct {
FirstName string
JWT string
}