package handlers import ( "context" "gopkg.in/tucnak/telebot.v3" "muskrat/storage" ) 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) }