Dungeons & Dragons now has a complete gunslinger class, and you can play it now via D&D Beyond. Although DnD has long allowed for the use of firearms, it's never really been designed around them. Guns are a little clunky, especially when you get into the reload mechanic, it's not an avenue that's always worth exploring. Players have long since tried to make their own gunslinger classes, either via creative use of certain fighter subclasses or bringing in homebrew. But that may change with the release of a new expansion.