PaulAsjes-zz / BuildingBots

Source code for the book Building Bots
1 stars 2 forks source link

First Redis Bot in book. #1

Closed aisflat439 closed 7 years ago

aisflat439 commented 7 years ago

Hi Paul, Thanks for the book. I've enjoyed it and found it challenging. I'm reading the book on Kindle and encountering quite a few instances of channel.send('some content') rather than bot.send('some content', channel). It might improve readers experiences if there was a clarification in the README that addressed some of the updated code. Best Devin

PaulAsjes-zz commented 7 years ago

Hi Devin, thanks for letting me know! The code is in this repository has the corrected code and I've updated the README to reflect that. Let me know how you found the book and thanks for reading!

0xpetersatoshi commented 7 years ago

Hi Paul,

Thought I should let you know that this error actually appears in chapter 3 as well in the index.js file.

In your file you have:

bot.respondTo('hello', (message, channel, user) => { channel.send('Hello to you too, ${user.name}!') }, true);

which produces an error. Thanks to @aisflat439 pointing this out, I changed it to the following which then worked just fine:

bot.respondTo('hello', (message, channel, user) => { bot.send('Hello to you too, ${user.name}!', channel) }, true);

Other than that, really loving the book so far. Thanks!

PaulAsjes-zz commented 7 years ago

@pbegle Thanks for catching this! I'll add it to the errata section of the readme.