There are countless platforms, frameworks and code examples out there and depending on your needs you can end up spending considerable time researching, trialling and comparing different offerings.
Having gone through this process, if you’re starting out my recommendation would be to just dive in with Google Dialogflow—it’s with one of the majors so you can’t go too wrong, it’s relatively easy to use when you first start, leverages Google’s incredible technology, can publish to a good number of channels, and there’s a lot in the way of available training material, examples and community behind it.
To get started quickly I’d also recommend completing Coursera’s Building Conversational Experiences with Dialogflow course. I found it well worth the time to familiarise with the space, platform and process of building bots.
That said, it’s not for everyone, nor necessarily your specific needs. I use Dialogflow as my platform of choice and a couple of others depending on what I’m doing. Others explored as listed, expecting to update this over time.