shanetechwiz / node-steamcardbot

Steam Trade Bot - CSGO Card Sets for Keys
MIT License
31 stars 14 forks source link

TypeError: Cannot read property 'low' of undefined #7

Closed daetoya closed 6 years ago

daetoya commented 7 years ago

/home/user/node_modules/long/dist/long.js:310 return fromBits(val.low, val.high, val.unsigned); ^

TypeError: Cannot read property 'low' of undefined at Function.fromValue (/home/user/node_modules/long/dist/long.js:310:28) at Function.SteamID.decode (/home/user/node_modules/steam/lib/steamID.js:19:18) at SteamFriends.sendMessage (/home/user/node_modules/steam/lib/handlers/friends/index.js:59:20) at log (/home/user/bot.js:41:15) at SteamClient. (/home/user/bot.js:53:3) at emitNone (events.js:86:13) at SteamClient.emit (events.js:185:7) at SteamClient.handlers.(anonymous function) (/home/user/node_modules/steam/lib/steam_client.js:243:8) at SteamClient._netMsgReceived (/home/user/node_modules/steam/lib/steam_client.js:157:26) at emitOne (events.js:96:13)

how do i fix that?

SloRunner commented 7 years ago

when did it happen? can you replicate this? since it comes from node modules

daetoya commented 7 years ago

@SloRunner I've tried reinstalling all required modules and long.js, but nothing seems to help. I haven't edited anything, only config.js

SloRunner commented 7 years ago

enter npm -v and node -v and post the output of both

daetoya commented 7 years ago

node - 6.11.2 npm - 3.10.10 @SloRunner

daetoya commented 7 years ago

installed node 8.3.0 and npm 5.3.0, still the same problem.| @SloRunner

SloRunner commented 7 years ago

when do you get that error? on trade offer?

daetoya commented 7 years ago

on start ffs @SloRunner

SloRunner commented 7 years ago

try to reinstall node modules (delete node_modules folder and npm i again) in node 6.11.2, this script is not ready for 8.x.x since it does not include promisify @shanetechwiz do you know anything about this?

GGrandma commented 6 years ago

I'm getting the same error, tried everything said before and have Node 6.11.2. This happens on start for me to.

shanetechwiz commented 6 years ago

Let me see your config file. You can remove any sensitive info you may have there

Unparanormal commented 6 years ago

module.exports = {

admin: {
    Unparanormal: '76561198079677502'
},

bot: {
    name: 'rickscardforkeys',
    username: 'rickscardforkeys',
    password: 'xxxxxxxx',
    identity_secret: 'xxxxxxxx=',
    shared_secret: 'xxxxxxxxx=',
    steam_id: '76561198437188259',
    apikey: '00BxxxxxxxxxxxxxxxxxxxxxxxxxxC',
    tradelink: 'https://steamcommunity.com/tradeoffer/new/?partner=476922531&token=X2K3bVku'
},

message: {
    welcome: 'Welcome to Ricks Level up Service, Our current rate is 16:1 (Set > Key) Use !help for more information to start.',
    help: 'Current commands, !buy to purchase cards for our rate using CSGO Keys, If you would like to sell contact my Owner.',
    buy: 'Processing your request',
    tradeoffer: 'https://steamcommunity.com/tradeoffer/new/?partner=476922531&token=X2K3bVku',
    cards_sold: 'You have sold :',
    invalid_command: 'That is an invalid command, please use !help for a list of commands. :)',
    invalid_number_of_keys: 'You do not have that many keys. :(',
    excess_keys: 'Too many keys for this trade, please use a seperate trade!',
    not_in_friendlist: 'Youre not my friend! Please add me :)'
},

max_number_of_keys: 100,

sets_per_key: 16,

app_id: {
    csgo: 730,
    steam: 753
},

context_id: {
    keys: 2,
    cards: 6
}

};

GGrandma commented 6 years ago

I have the same config except the credentials

shanetechwiz commented 6 years ago

Ok, bot.js, what do you have on line 38?

Unparanormal commented 6 years ago

steamFriends.sendMessage(config.admin.Oshane, message.toString());

Assuming Oshane should be changed to our admin username?

shanetechwiz commented 6 years ago

Bingo. There you go :)

GGrandma commented 6 years ago

@shanetechwiz command list?

Unparanormal commented 6 years ago

Works perfect!

Thank you my dude. Could you provide us will the list of available commands you can use with the bot.

shanetechwiz commented 6 years ago

Awesome. No problem.

In regards to a command list, right now it's hardcoded so to make it a bit more dynamic will have be a future feature.

Currently there's

!help and !buy x where x is the number of keys a user wants to trade for.

I'm gonna close this issue seeing that it's been resolved

Unparanormal commented 6 years ago

Okay, thanks :) Looking forward to updates.