I came upon a most interesting article published in the "Jane Austen's World" blog about how chocolate came to Europe (apparently it arrived in Spain in 1585) and how recipes for hot chocolate changed over time. Originally hot chocolate was prepared with chile peppers (reflecting its Mexican roots) and was as popular as tea and coffee among the upper classes of Europe. But tastes changed over time as the refining of chocolate got more sophisticated until the recipes for hot chocolate and chocolate candies in the 18th century omitted the chiles and began to approximate their modern day counterparts. Here's the link to the blog article which, in turn contains links to other sources on the topic.
https://janeaustensworld.com/2008/08/09/hot-chocolate-18th-19th-century-style/