Now that we've seen how to process keywords, commands, and API calls, we will look at the next logical step in bot building: persistent data storage and retrieval. References to data can be kept in JavaScript by assigning said data to a variable; however, its use is limited to when the program is running. If the program is stopped or restarted, we lose the data. Hence, persistent data storage is required for certain tasks.
This allows us to build bots that can, for instance, keep track of a leaderboard or store a to-do list.
In this chapter, we will cover:
Introduction to Redis
Connecting to Redis
Saving and retrieving data
Best practices
Error handling