The Messenger of Allah ﷺ cursed anyone who takes a living creature as a target.
أخبرنا قتيبة بن سعيد قال حدثنا هشيم عن أبي بشر عن سعيد بن جبير
لعن رسول الله ﷺ من اتخذ شيئا فيه الروح غرضا
Muslim narrated it in "Hunting and Slaughtered Animals," chapter "The Prohibition of Confining Animals," hadith no. 1958, from the hadith of Hushaym. And Bukhari narrated it in "Slaughtered Animals and Hunting," chapter "What is Disliked of Mutilation, Confining Animals, and Killing Them While Immobilized," hadith no. 5515, from the hadith of Abu Bishr Jafar bin Abu Wahshiya, through the same chain. It is also found in Kubra, hadith no. 4530.