package handlers import ( "context" "gitea.russia9.dev/russia9/muskrat/storage" "gopkg.in/telebot.v3" ) func Router(ctx telebot.Context) error { state, metadata, err := storage.GetState(context.Background(), ctx.Sender().ID) if err != nil { return err } switch state { case "phone": return Phone(ctx) case "code": return Code(ctx, metadata) case "password": return Password(ctx, metadata) case "edit": return EditInput(ctx, metadata) } return List(ctx) }