What kind of attack does a weapon trap with only crossbows use? Does it use bolts, and if so, which ones? Or does it only use the melee bash attack?
Weapon traps with ranged weapons are exactly like weapon traps with anything else - when the trap is triggered, the weapon attacks.
Ranged Weapon Traps specifically, however, do require ammo and need to be reset, same as Stonefall and Cage Traps (but with bolts rather than stones or cages). They'll use whatever bolts your mechanic can get their hands on, so you might want to forbid certain bolts / use burrows if you'd rather the trap be loaded with a specific batch.