Closed Stateford closed 7 years ago
I haven't checked on this for a while, because I haven't received any issues since I posted this. I'll try to pick up on development as soon as possible.
On Friday, 28 October 2016, idietmoran notifications@github.com wrote:
Client.sendMessage() does not work as intended.
I get an error stating message is not a function, probably has something to do with lib/client.js
not sure if this project is dead or not.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Gielert/NoodleJS/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AC6oOGemkRL96XHpos3opgLjvOtoCqdkks5q4ZhTgaJpZM4KjH-O .
Are you sending a message to a specific channel? Because the client.sendMessage requires a TextMessage object containing user/channel info. The client stores all channels in an array, so you should be able to use channel.sendMessage("your message", true/false). channel.sendMessage() uses the client.sendMessage() to write a message to the server, so client.sendMessage() should not be called directly. I'll update my documentation asap.
client.on('textMessage', function(event) {
event.textMessage.sender.channel.sendMessage('test, false');
switch(event.textMessage.message) {
// res/audio/donald/*
case 'test':
event.textMessage.sender.channel.sendMessage('foo', true);
break;
}
}
I'm trying this.
I'm not sure if he can't respond due to permissions due to certificate issues.
Is there a way to link certificates to the bot? It's not in the docs.
There's currently no way to link certificates iirc. I tested your code and it seems to be working for me. The bot always connects insecure.
Client.sendMessage()
does not work as intended.I get an error stating message is not a function, probably has something to do with
lib/client.js
not sure if this project is dead or not.