I don't remember that being the case lol.
It doesn't need to be a sword, but it needs to be a blade, like Whitebeard's bisento. So things like axes, etc., work. But we definitely have no proof of defensive things like shields, or projectile-based weapons like guns and bows.
In fact, they are...