You can find the information about the connected accessories with the claw accessory state and gun accessory state events. These events should be fired during the initial AllStates/AllSettings phase, or when an accessory is plugged/unplugged.
For both of these, the event can either report an empty list (no accessory of this kind in currently plugged) or a single element list (current firmwares does not support multiple accessories at the same time). In the single element list, the element will contain the USB Id (the value you're looking for) of the accessory.
By default, the usb ids of each accessory will be
0, as the drone can not have more than one. But you have to use the previously mentioned events to know whether the accessory (if any) is a claw or a gun.