In reply to pacokeks: [can you add a check what kind of weapon the user is wielding?]
Using the database yes. You can find the weapon id and check if subclass is for bow or gun etc. But It will be expansion dependent. Also, lets say player looted better gun than the current bow, bot will equip and then it has no bullets to use it. This is the other reason Cava is buying both