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

The bot join the irc correctly but can't write #229

Closed
Uranne opened this issue May 23, 2017 · 4 comments
Closed

The bot join the irc correctly but can't write #229

Uranne opened this issue May 23, 2017 · 4 comments

Comments

@Uranne
Copy link

Uranne commented May 23, 2017

Actual behaviour:
Catch a string on the twitch chat, error on the function "client.say()"

Expected behaviour:
Catch a string on the twitch chat, write an auto response

**Code : **

var tmi = require('tmi.js')
var oauth = require('./password.js')

var options = {
	options: {
		debug: true
	},
	connection: {
		reconnect: true
	},
	identitiy: {
		username: "boturanne",
		password: oauth.password
	},
	channels : ['#uranne']
}

var client = new tmi.client(options);

client.connect();
client.join("#uranne")
client.on("chat", (channel, user, message, self) => {
	if(self) return
	
	if(channel == "#uranne") {
		if(message == "ping"){
			client.say("#uranne", "pong")
		}
	}
	
})

Error log:
http://puu.sh/vZa0K/f463d3a533.png

Server configuration

  • Operating system: windows 10 family 64bit
  • Node version (if applicable): 6.10.3
  • NPM version (if applicable): 3.10.10
  • tmi.js version:
@Schmoopiie
Copy link
Member

As mentioned in the docs and the README.md, this module currently supports Node 4.x. There is still no ETA when we will support Node 6.x and 7.x

@Schmoopiie
Copy link
Member

Closing this as it is a duplicate of #201

@Schmoopiie
Copy link
Member

Also, no need to double join your channel, you don't need to call client.join("#uranne") if you already have the channel in the options as they will be automatically joined once connected 😸

@Uranne
Copy link
Author

Uranne commented May 23, 2017

Thank you :)
I fixed the issu about my nodejs version.
Now I don't have any error log, but, the function client.say() doesn't work ...
(I put a console.log("Word received"), the console show it, but the bot doesn't talk.

http://puu.sh/vZg2v/f885e86dbe.png

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

No branches or pull requests

2 participants