bot sends and recieves certain packets from the server, the server knows you're doing something wrong/illegal, and when blizzard employees have a bad day they ban accounts that were on the list for using third party programs. It cant be prevented, its all luck. some poeple use all the hacks they can download and never lose an account and some poeple lose their after one day of using a hack. Its permanent for now, when 1.10 comes out, it might be different, but as a safeguard you can make a separate botting account on a separate cdkey so if they do ban it, you still have another account.