steam-chat-bot / node-steam-chat-bot Goto Github PK
View Code? Open in Web Editor NEWSimplified interface for a steam chat bot
License: MIT License
Simplified interface for a steam chat bot
License: MIT License
At the moment the bot does not seem to acknowledge my friend request. Anyone else have this issue?
~/test# npm install steam-chat-bot
npm WARN engine steam-chat-bot@2.0.1: wanted: {"node":"0.12.x","npm":"1.4.x"} (current: {"node":"0.12.0","npm":"2.11.2"})
Killed
~/test# make: Entering directory `/usr/local/lib/node_modules/steam-chat-bot/node_modules/ws/node_modules/utf-8-validate/build
CXX(target) Release/obj.target/validation/src/validation.o
SOLINK_MODULE(target) Release/obj.target/validation.node
COPY Release/validation.node
make: Leaving directory `/usr/local/lib/node_modules/steam-chat-bot/node_modules/ws/node_modules/utf-8-validate/build'
at this point the installation stops
NodeJS: v0.12.0
npm: v 2.11.2
OS: Debian
Help me, please!
I'm wondering if this is still working ? Not sure if it somehow outdated ?
Im confussed : There is:
https://github.com/bonnici/node-steam-chat-bot
and
https://github.com/Efreak/node-steam-chat-bot
In progress.
Main log displays everything as usual, but only logs warnings, errors to file, not general chat.
New trigger logs each groupchat/userchat to a different file, serves live/updating logs that can be filtered by groupchat as well as static downloads (download of userchats disabled).
(This issue is mainly a reminder to myself)
Is the example.js file meant to show all available options? I can't find an example for the JointChatTrigger. And the AcceptChatInviteTrigger in it doesn't seem to work for me.
Find all api calls (baseTrigger.js and other triggers) and update them to use either the new chatBot.steamApi() or baseTrigger.steamApi(). (see #89)
Will require a google translate API key. Uses either paton/node-google-translate or mikejholly/node-google-translate or opower/tramp.
For now, fix this. After that, add more error handling.
/home/chatbots/node_modules/steam-chat-bot/lib/chatBot.js:141
function(groupID, headline) { that._onAnnouncement(that.maingroup, headLine);
^
ReferenceError: headLine is not defined
at SteamClient.<anonymous> (/home/chatbots/node_modules/steam-chat-bot/lib/chatBot.js:141:108)
at SteamClient.emit (events.js:110:17)
at SteamClient.handlers.(anonymous function) (/home/chatbots/node_modules/steam-chat-bot/node_modules/steam/lib/handlers/friends.js:319:10)
at SteamClient._netMsgReceived (/home/chatbots/node_modules/steam-chat-bot/node_modules/steam/lib/steam_client.js:106:26)
at SteamClient.handlers.(anonymous function) (/home/chatbots/node_modules/steam-chat-bot/node_modules/steam/lib/steam_client.js:192:10)
at SteamClient._netMsgReceived (/home/chatbots/node_modules/steam-chat-bot/node_modules/steam/lib/steam_client.js:106:26)
at Connection.emit (events.js:107:17)
at Connection._readPacket (/home/chatbots/node_modules/steam-chat-bot/node_modules/steam/lib/connection.js:50:8)
at Connection.emit (events.js:104:17)
at emitReadable_ (_stream_readable.js:424:10)
logTrigger modifies the built-in http server, and there's no way to clean itself up. For the time being at least, just reinitialize the http server when we cleartriggers.
Maybe see about adding an onUnload function to modules for cleanup.
Another one. Any chance of the steamrepTrigger getting a local cache
Cheers
When connection lost, let the viewer know via client-side scripting. Popup, change background color, etc.
Have to decide if I want to update everything. The new version of node-steam requires node.js 0.12, not 0.10. If anyone has tried running node-steam-chat-bot under 0.12, please let me know if it works right.
There's currently no way for triggers to perform cleanup functions when they get removed. Add an onUnload that gets called when we run removeTrigger() and clearTriggers(). Added due to #80.
I need the VAC warning removed from all OP chats, the ones below fam
http://steamcommunity.com/gid/103582791432751135
http://steamcommunity.com/gid/103582791434485851
http://steamcommunity.com/gid/103582791433402816
http://steamcommunity.com/gid/103582791433870096
I also need Miley to automatically join this group after sign in, like she does the other 3 groups
Hey guys, terribly sorry about this one.
Don't know how this slipped past me, but LinkName triggers only on every second link. The reason as I understand it, is that the exec method doesn't reset to beginning every time it's called as described here:
http://www.codeitive.com/7xNxUgkVUP/why-is-javascript-regex-matching-every-second-time.html
Several solutions are described in the link, for my local bot I went with the hacky one- just calling exec again after I got the link once to reset its index back to 0, as shown here in line 54:
http://hastebin.com/sariboxodi.coffee
Works just fine now, but as always, you might have a more elegant solution ;)
If anyone's willing to test it out, please post results here.
heroku login
in your command prompt/shell to logingit clone git://github.com/Efreak/node-steam-chat-bot.git && cd node-steam-chat-bot && git checkout alternative-non-fs-config && heroku create
(clone the bot, switch branches, and make it a heroku app)git add example-heroku.js Procfile && git commit -m "update config" && git push heroku master
(push everything to heroku)heroku ps:scale web=1
heroku open
- open the bot's internal webserver in your browserSuggestions for changes are in the wiki
This is all from a single login. How can I prevent the bot from doing this?
I tried doing myBot.joinchat(chatid), and it says it's joining the chat, but it doesn't actually join.
The linkifier isn't working correctly for the group names.
So I updated youtube to the newest version, but I am getting an error everytime I start up my bot. It goes something like this:
2015-05-01T04:05:56.396Z - error: TypeError: Cannot read property 'params' of null
at YoutubeTrigger._respond (/Users/Kyle/node_modules/steam-chat-bot/lib/triggers/youtubeTrigger.js:44:27)
at YoutubeTrigger._respondToChatMessage (/Users/Kyle/node_modules/steam-chat-bot/lib/triggers/youtubeTrigger.js:39:14)
at BaseTrigger.onChatMessage (/Users/Kyle/node_modules/steam-chat-bot/lib/triggers/baseTrigger.js:86:27)
at /Users/Kyle/node_modules/steam-chat-bot/lib/chatBot.js:478:41
at Function._.each._.forEach (/Users/Kyle/node_modules/steam-chat-bot/node_modules/underscore/underscore.js:158:9)
at ChatBot._onChatMsg (/Users/Kyle/node_modules/steam-chat-bot/lib/chatBot.js:477:5)
at SteamClient.<anonymous> (/Users/Kyle/node_modules/steam-chat-bot/lib/chatBot.js:127:91)
at SteamClient.emit (events.js:118:17)
at SteamClient.handlers.(anonymous function) (/Users/Kyle/node_modules/steam/lib/handlers/friends.js:261:8)
at SteamClient._netMsgReceived (/Users/Kyle/node_modules/steam/lib/steam_client.js:106:26)
If anyone knows how to fix it, please open a pull request, as I have no idea how.
As the title says, using the webserver plus the logTrigger won't allow live logs to show up.
So my bot doesn't join when the Auto-join chat trigger is added. My code is:
{
name: "AcceptChatInvite",
type: "AcceptChatInviteTrigger",
options: {
chatrooms: { "103582791435108754": "Hello, the chat bot has arrived!" },
autoJoinAfterDisconnect: true
}
},
Since that didn't work, I tried to use myBot.joinChat('103582791435108754'); to join, but that doesn't work either.
Get the bot logging in again (without any triggers at all).
Any chance of auto kick for spam being implemented?
https://github.com/seishun/irc-steam-relay
By default, they don't run together at all, at least using the same account. What if some variable names or something are changed though? If it isn't possible, can a similar functionality be added?
After some thinking and some motivational sessions, I've decided to start/finish writing tests for the bot. These tests will be available in the spec folder, and will follow the current testing style by bonnici, using Jasmine and Sinon.
Get everything in chatBot.js working. This should include something like chatBot.steamApi('endpoint',version,{options}, function callback(statusCode,response){})
Notes:
#!/bin/node -
at the top of all configsws.onmessage=function(event){
nib=event;
//console.log(event);
if(JSON.parse(event.data).roomId===null) return;
if(JSON.parse(event.data).type === 'roomNames')roomNames=JSON.parse(event.data).names
else if(!window.location.hash ||window.location.hash === '#'+JSON.parse(event.data).roomId){
var li=document.createElement('li');
li.innerHTML=(Autolinker?Autolinker.link(format(JSON.parse(event.data))):format(JSON.parse(event.data)));
document.querySelector('#pings').appendChild(li);window.scrollTo(0,document.body.scrollHeight);
};
}
Will use brettlangdon/node-units for unit conversions.
Add a trigger to grab info from IMDB. Wolfram has nice info, but no ratings. imdb-api looks to be the most recently module to use, short of ripping off someone else's code.
Any chance of a trigger that sends each user that joins the chat a private message, with a cache so it doesn't spam people would be nice.
Cheers
Hi, I get this error everytime I start up my bot:
C:\Users\Kyle\node_modules\steam-chat-bot\node_modules\steam\lib\steam_client.js
:149
var keyCrc = require('crc').buffer.crc32(cryptedSessKey);
^
TypeError: Cannot call method 'crc32' of undefined
at SteamClient.handlers.(anonymous function) (C:\Users\Kyle\node_modules\ste
am-chat-bot\node_modules\steam\lib\steam_client.js:149:38)
at SteamClient._netMsgReceived (C:\Users\Kyle\node_modules\steam-chat-bot\no
de_modules\steam\lib\steam_client.js:105:26)
at Connection.emit (events.js:95:17)
at Connection.readPacket (C:\Users\Kyle\node_modules\steam-chat-bot\node_mo
dules\steam\lib\connection.js:50:8)
at Connection.emit (events.js:92:17)
at emitReadable (_stream_readable.js:410:10)
at emitReadable (_stream_readable.js:406:5)
at readableAddChunk (_stream_readable.js:168:9)
at Connection.Readable.push (_stream_readable.js:130:10)
at TCP.onread (net.js:528:21)
Not really sure what the problem is, maybe i'm missing a module?
Any chance of a year argument for the OMDB trigger?
Cheers
Instances of irc should be available to other instances of the trigger so as not to require multiple bots for the same network. One possible method is below.
var setupNetwork = function(network) {
this.chatBot.irc[network] = require('irc');
.......
}
if(this.chatBot.irc && this.chatBot.irc[network] {
setupRelay(network, chatroom, group);
} else if this.chatBot.irc {
setupNetwork(network);
setupRelay(network, chatroom, group);
} else {
this.chatBot.irc = {}
setupNetwork(network);
setupRelay(network, chatroom, group);
}
Move the webserver out of logTrigger and into chatBot.js, and provide api functions other triggers can use.
Required for #56.
Only one person can see them at a time; it stops sending to other viewer(s) when someone new connects
Added functions last September(?) I think I fully implemented them, so they should work, but I still haven't tested them yet.
Functions:
Announcement function should be removed and left to a trigger.
/home/action/workspace/node-steam-chat-bot/node_modules/steam/lib/steam_client.js:150
var cryptedSessKey = require('crypto').publicEncrypt(fs.readFileSync(__dirna
^
TypeError: Object #<Object> has no method 'publicEncrypt'
at SteamClient.handlers.(anonymous function) (/home/action/workspace/node-steam-chat-bot/node_modules/steam/lib/steam_client.js:150:42)
at SteamClient._netMsgReceived (/home/action/workspace/node-steam-chat-bot/node_modules/steam/lib/steam_client.js:106:26)
at Connection.EventEmitter.emit (events.js:95:17)
at Connection._readPacket (/home/action/workspace/node-steam-chat-bot/node_modules/steam/lib/connection.js:50:8)
at Connection.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
at emitReadable (_stream_readable.js:404:5)
at readableAddChunk (_stream_readable.js:165:9)
at Connection.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:528:21)
Several options:
Ideally, webui would have all the functions shown, and possibly more.
require('oauth');
(pushbullet oauth details here)require('openid');
. (steam openid details here)I will be adding examples of how words are used in a sentence in translate trigger. This is just a reminder for me since I'll forget.
so it seems that all of the triggers that require an api do not work for me (steamrep, YouTube, etc). Does anyone else have these issues/know how to fix them? Thanks.
Is this possible? Specifically, with the kick command. Since it really only makes sense to let people who can't already kick use this, I would like to be notified when it's used.
Use existing template, but get all documentation in it.
As #79 is completed, add to website.
It would be nice to have the documentation also get served by the bot's internal webserver,
It would be nice to have everything documented, but that's unlikely at this point. At the very least, I want to get all the important stuff documented. Also, all documentation should go on the website #78
In the OMDB trigger, when I added the year argument I realized that you can't ask for a movie if it has 2 words. I will implement a fix for this. Putting this here as a reminder.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.