Really sloppy stuff here due to how many ways it could be interpreted. Most of those interpretations end at "no", so that's where I'll put my vote. Really though, the ways this could be viewed by a reader are in the dozens if not higher, if somebody for no apparent reason armed them to the teeth well before they were "discovered" then that's some sort of alternate history novel and perhaps.
Blacks were sold to Europe and America from other blacks in Africa. If the blacks had weapons, their chances of being sold would go down. When slavery first started, their were more whites than blacks, so the whites would have outnumbered the blacks. Eventually, the blacks would out number the whites, then the guns would be more useful.
No, arming black people would not have prevented slavery. More than likely, the Africans did have weapons, but none that were good enough to stand up against guns. And once they reached America, the slaves were outnumbered. Even if they had weapons, slave owners and other white people would've been able to outnumber them and defeat them.
No one would jump into slavery willingly so black people probably did have weapons but inferior ones so they were able to be caught and sold. Had the black people had access to weapons on par with the people capturing them and selling them it may have been harder but they still would probably been caught and sold. There were a lot and still are a lot of smaller villages and clusters of people lining in Africa making it easier to single out individuals or small groups , in that case it would have just became a matter of superior numbers that would have resulted in the capture of black people for slavery.