Bans happen man. You could bot for 1 minute, 1 hour, 1 day, a week, a month, sometimes even longer. Bans are the risk associated with botting.
It's very unfortunate that you were banned like that. There are a few factors that can come into play though.
IP, were you using a proxy?
F2P, were you F2P botting? Ban rates in F2P are through the roof.
Was the account a fresh account?
Did you buy the account which could have causes a drastic change in IP shortly after creation?
All things to think about and consider while botting.