Bot should show an error if profile is invalid #16

Closed
Krinkle opened this Issue Mar 25, 2013 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

Krinkle commented Mar 25, 2013

I just downloaded oftn-bot and duplicated the example your-bot-here.js file. It all worked fine until I moved the profile to a separate file and require'ed (like ecmabot does).

Executing node mybot.js just returned back to the console with no output at all.

Took me a while to figure out what it was. Turns it it didn't do anything because the -profile.js file I created assigned one single object to module.exports instead of an array (copy/paste mistake).

Would've helped if it had output some kind of error instead of just not doing anything.

As a separate request, perhaps support profile to be a (single) object in addition to an array. But regardless if it is invalid (e.g. function, or undefined, or in the current state even an object) an error would be nice.

@dsamarin dsamarin closed this in d63fa40 Mar 26, 2013

Contributor

Krinkle commented Mar 26, 2013

😯 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment