/yowl-lock-redis

Lock user interactions that require a long response

Primary LanguageJavaScriptMIT LicenseMIT

yowl-lock-redis

Lock a user interaction via redlock so that you can make an async call or multiple sends in between messages without having the user mess up your bot with a new request.

Install

$ npm install yowl-lock-redis --save

Usage

var lock = require('yowl-lock-redis'); 

bot.use(lock([{ host: 'localhost' }], {}, "Let me finish what I'm doing before asking me something else!");