Shantanu N. Zagade
Shantanu N. Zagade
About the Author
Paul Asjes started programming on his TI-83 calculator in high school and has been hooked ever since.
Specializing in JavaScript, he is always interested in staying up to date with the latest developments in the field. Currently, he is building universal full-stack apps with technologies such as React, Webpack, and Node when he's not spending far too much time on Slack.
Since his IRC days, he has been interested in chat bots and how they can be used. He has written several Slack bots to date, ranging from bots that facilitate playing games to bots that retrieve important business metrics.
I would like to thank my wife, Caitlin, for being my biggest fan, proofreader, and muse during the writing of this book.
About the Reviewer
Nicolas Greni is a hacker-in-residence at 3scale, living between Barcelona and San Francisco.
Nicolas built his first website in 2000 using Microsoft Word and since then has not stopped learning about programming.
This API freak likes to try new languages and APIs all the time. He has built many integrations for Slack and Amazon Echo. He runs a good number of meetups in Barcelona about APIs, Meteor, and entrepreneurship.
When he isn't working, you have a good chance of finding him hacking side projects or enjoying a good craft beer. And, of course, as he is French, frogs and snails are part of his daily diet!
I want to thank Steven Willmott, the CEO of 3scale, and the entire 3scale team for giving me the inspiration and time to hack interesting projects and technology.
I also want to thank my parents and family for the positive learning environment they've built, letting me explore my passion and curiosity for technology.
www.PacktPub.com
eBooks, discount offers, and more
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at > for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print, and bookmark content
- On demand and accessible via a web browser
Preface
Chat bots have become big talking points in the world of business and software development. On the forefront of team communications is Slack, a platform for talking to colleagues and friends about absolutely anything. The engineers at Slack saw the potential and have designed a system that allows anyone to build their own Slack bots for productivity, ease of use, or just plain entertainment.
This book will teach you how to use a myriad of tools to build the very best bots for the Slack platform. Whether you are a programming beginner or a seasoned veteran, by the end of this book, you will be able to create high-quality bots whose only limit is the your imagination. You might also pick up a few tricks along the way.
What this book covers
, Getting Started with Slack , shows you what is Slack and why we should care about Slack bots.
, Your First Bot , takes you through building your first bot and explains how it works.
, Adding Complexity , helps us expand our first bot with new and useful functionalities.
, Using Data , teaches you how to use persistent data with your Slack bots.
, Understanding and Responding to Natural Language , teaches you about natural language processing and how to develop a bot that can comprehend and respond in natural language.
, Webhooks and Slash Commands , takes us through the uses of webhooks and Slash commands in a Slack setting.
, Publishing Your App , teaches you how to publish your app or bot so that it can be used by others outside your company.
What you need for this book
You should have an intermediate understanding of JavaScript and programming concepts in general. For this book, we will be using Node.js version 5.0.0. This means that the JavaScript code samples contained within will use ECMAScript 2015 (ES2015, more commonly known as ES6) features, which have been enabled in Node v5.0.0. For a full list of ES6 features enabled in Node.js version 5 and up, visit the Node.js website (https://nodejs.org/en/docs/es6/).
This book, its techniques, and the code samples within are OS-agnostic, although for debugging purposes, either the Google Chrome or Opera browser is required.
Who this book is for
This is a book for software developers who want to build Slack bots for their own company's use or for customers.
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Save the file and then run the code via