"So your Lord poured upon them a whip of punishment," meaning a type of punishment, and thus He destroyed them.
﴿فَصَبَّ عَلَيْهِمْ رَبُّكَ سَوْطَ عَذَابٍ﴾ لونا من الْعَذَاب فأهلكهم