How can I stop bats in Minecraft?

Fi
1

I would like to make a bat in Minecraft that it can't fly away.

I have already tried the Command / effect @e [type = bat] slowness 10000 255, but I think it only prevents mobs from running.

Does anyone know what the command is like?

De

https://minecraft.tools/de/spawn.php

You can set it there