Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot call method 'indexOf' of undefined #227

Closed
lucastabelini opened this issue Apr 7, 2014 · 0 comments
Closed

Cannot call method 'indexOf' of undefined #227

lucastabelini opened this issue Apr 7, 2014 · 0 comments

Comments

@lucastabelini
Copy link

I have this code to create the client:

...
var bot = new irc.Client('irc.quakenet.org', 'gatherBot', {
    channels: ['#kag.brasil'],
    userName: 'GatherBot',
    realName: 'nodeJS KAG Gather client',
    debug: true,
    showErrors: true,
});
...
bot.addListener('message', function (from, channel, message) {
    if (message.indexOf("!") === 0){
    ...
    }
}

And I get the error described in the title. What's wrong with my code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant