Open aairey opened 7 years ago
Thanks for the effort, looks very good to me and I'm happy someone took the time to update it :+1:
The only thing that holds me back from merging are the changes in package.json
, I don't think the urls should still be pointing to the fork :)
Done :)
Hmm there is still some error with the getProfileUrl
function.
I think the request
library is not used properly.
[Fri Oct 14 2016 09:24:44 GMT+0000 (UTC)] ERROR TypeError: request(...).call is not a function
at SteamBot.getProfileUrl (/hubot/node_modules/hubot-steam/src/steam.coffee:101:11, <js>:184:12)
at SteamBot.getProfileUrl (/hubot/node_modules/hubot-steam/src/steam.coffee:1:1, <js>:3:61)
at SteamBot.gotGroupMessage (/hubot/node_modules/hubot-steam/src/steam.coffee:67:7, <js>:96:21)
at SteamFriends.<anonymous> (/hubot/node_modules/hubot-steam/src/steam.coffee:1:1, <js>:3:61)
at emitMany (events.js:108:13)
at SteamFriends.emit (events.js:182:7)
at SteamFriends.handlers.(anonymous function) (/hubot/node_modules/steam/lib/handlers/friends/index.js:334:8)
at SteamFriends.<anonymous> (/hubot/node_modules/steam/lib/handlers/friends/index.js:21:28)
at emitThree (events.js:102:20)
at SteamClient.emit (events.js:175:7)
at SteamClient._netMsgReceived (/hubot/node_modules/steam/lib/steam_client.js:172:10)
at SteamClient.handlers.(anonymous function) (/hubot/node_modules/steam/lib/steam_client.js:259:10)
at SteamClient._netMsgReceived (/hubot/node_modules/steam/lib/steam_client.js:157:26)
at emitOne (events.js:77:13)
at Connection.emit (events.js:169:7)
at Connection._readPacket (/hubot/node_modules/steam/lib/connection.js:50:8)
at emitNone (events.js:67:13)
at Connection.emit (events.js:166:7)
at emitReadable_ (_stream_readable.js:411:10)
at emitReadable (_stream_readable.js:405:7)
at readableAddChunk (_stream_readable.js:157:11)
at Connection.Readable.push (_stream_readable.js:110:10)
at TCP.onread (net.js:523:20)
Maybe someone more familiar with it can take a look?
Thanks :)
Ah yeah that part is pretty ugly, I just started to use js back then :grin: But I will take a look at it
I manually merged your changes and also fixed the problem you mentioned above. It's all on the next branch.
There was one change I reverted since it did not work for me in line 81 and 85 I use envelope.user.id
instead of envelope.user.room
, otherwise the bot would not respond at all. Do you know / remember the reason for this change?
Well, when joining the bot to a groupchat, it would respond to the group chat room. As expected. When talking to the bot directly it should indead send a reply to the user not, to the room.
I saw some use of room 'priv' but I am not actually sure that that is working ...
For my use case it was working as expected with envelop.user.room. though.
On 15 October 2016 at 17:25, Martin Wagner notifications@github.com wrote:
I manually merged your changes and also fixed the problem you mentioned above. It's all on the next https://github.com/Mawalu/hubot-steam/tree/next branch.
There was one change I reverted since it did not work for me in line 81 https://github.com/Mawalu/hubot-steam/blob/next/src/steam.coffee#L81 and 85 https://github.com/Mawalu/hubot-steam/blob/next/src/steam.coffee#L85 I use envelope.user.id instead of envelope.user.room, otherwise the bot would not respond at all. Do you know / remember the reason for this change?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Mawalu/hubot-steam/pull/5#issuecomment-253990792, or mute the thread https://github.com/notifications/unsubscribe-auth/AHSjvkN_K3YLz1YPSPL3I_f1FxGdcLcNks5q0PBcgaJpZM4KVQBQ .
Ah now I understand.
As you said priv
ist used as room
for private messages. If I'm right, changing that line to:
user = id: source, name: steamurl, room: source
should solve the problem.
I currently don't have access to my dev box so you can try if this works or I will report once I'm back.
Yes, that is probably it :)
Fixes #3.
Also has the following new features: