Bettas can be kept in community aquariums however do not belong in some tanks. Here's what they should have in their tanks or their tank should have:
• they should be in with fish that will take no interest in the Bettas fins
• they should be in with fish that will allow the betts to eat, Bettas are slow eaters and cannot out compete some faster moving fish.
• they should be kept in tanks that do not have high flow output. The bigger the tank the bigger the filter finally equalling most of the time in a larger flow, Bettas do not like and actually cannot handle a strong current so make sure the filters flow isn't so powerful.
• do not keep them in tall tanks. They should be kept in tanks with not a lot (or excessive amounts of) height. Male Bettas are not really made to swim, they're made to be showy and pretty so constantly swimming up air will wear them out eventually. This combined with large flow can be lethal.
• they should be housed with properly sized fish. No nano fish, the smallest fish id say they can safely be housed with are neon tetras. Now I'm not saying neons are the ONLY fish they can be housed with, because they aren't, I was just giving i size comparison. They should be no smaller than the size of the neon tetra.
Never kept males with males so I don't really wanna give you any false info on that.