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

TypeError: No method channel #254

Closed
enriquemorenotent opened this issue Nov 3, 2014 · 3 comments
Closed

TypeError: No method channel #254

enriquemorenotent opened this issue Nov 3, 2014 · 3 comments

Comments

@enriquemorenotent
Copy link

I have this code written in Coffeescript:

irc = require "irc"

class Bot

    config:
        server: "irc.freenode.com"
        name: "MyBot"

    constructor: ->
        @client = new irc.Client
            connection:
                host: @config.server,
                port: 6667
            identity:
                nickname: @config.name

        channel = @client.channel "#echotest"

new Bot()

When I run it, I get this message:

TypeError: Object #<Client> has no method 'channel'
@mbouchenoire
Copy link
Contributor

If you installed the irc module via npm install irc then you got the 0.3.x branch, which does not have the channel() function anymore (replaced by join())

@enriquemorenotent
Copy link
Author

Then why is it written like this on the main README?

mbouchenoire added a commit to mbouchenoire/node-irc that referenced this issue Nov 4, 2014
In the issue martynsmith#254, an user is asking why the main README is showing an use case of the master branch while npm installs the 0.3.x branch. I added a small clarification on the master README explaining the situation.
@ward
Copy link

ward commented Mar 27, 2016

This can be closed, it details confusion between the new and old API.

@jirwin jirwin closed this as completed Mar 27, 2016
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

4 participants