No. No food guarantees TYPE 2 diabetes.
Type 1 is 100% an autoimmune problem, when the body attacks itself destroying the produce of insulin. There is no known or specific cause, it just happens. It can't be avoided.
Type 2 has MANY risk factors, a few to name are; being obese, very bad diet, severe lack of exercise, being pressured/stress a lot, genetics etc.
Like I said these are just risk factors not guarantees. If your diet was very bad for ages your risk of type 2 would be slightly increased.