Jump to content
McKay Development

SunriseM

Member
  • Content Count

    46
  • Joined

  • Last visited


Reputation Activity

  1. Like
    SunriseM reacted to GitHub in node-steam-tradeoffer-manager v2.7.3   
    Added id property to objects pushed to itemsToGive and itemsToReceive when building a trade offer (PR #225) Made the TradeOffer class exportable for use with Bluebird (PR #227)This still isn't officially supported and may break in the future if you rely on it Updated getExchangeDetails to use new WebAPI method which has greater reliability  
    View on GitHub
  2. Like
    SunriseM got a reaction from jafix in Bot only plays 1 game   
    Try with client.gamesPlayed(["Custom message", 440]);
  3. Like
    SunriseM got a reaction from Royalgamer06 in Function on getchatHistory   
    Did you try writing  the client.on('chatHistory',..) part before client.getChatHistory?
  4. Like
    SunriseM got a reaction from Enemtia in Shared secret and Identity secret   
    If you set a password, it will be encrypted so you will have to disable it first
  5. Like
    SunriseM got a reaction from TomYoki in Read numbers and/or words from Chat Messages?   
    You can use "split" to convert the string to array and get the part you want. Example:
    client.on('friendOrChatMessage', (senderID, message) => { //Example Message: /bet 45 var arrmsg = message.split(" ") //arrmsg = ["/bet","45"] var userNumber = arrmsg[1] if (message.indexOf("/bet") == 0){ client.chatMessage(senderID, 'Your bet is: ' + userNumber); } });
  6. Like
    SunriseM got a reaction from Lobadzip in How can I get data from the user?   
    You can use "split" to convert the string to array and get the part you want. Example:
    client.on('friendOrChatMessage', (senderID, message) => { //Example Message: /bet 45 var arrmsg = message.split(" ") //arrmsg = ["/bet","45"] var userNumber = arrmsg[1] if (message.indexOf("/bet") == 0){ client.chatMessage(senderID, 'Your bet is: ' + userNumber); } }); You will have to add other things like be sure that input has /bet [number],  verify the number can be used, etc
  7. Like
    SunriseM got a reaction from TomYoki in get assetIDs by calling getInventoryContents?   
    You should use a loop (for, foreach, while, etc) to iterate all the inventory callback, you can create an array called items, and in each iteration you push a object like this one:
    var item = { "assetid": inventory[i].id, "name": inventory[i].market_hash_name } if you need to make an asynchronous operation with that info and know when all iterations are finished, you can use async module. 
×
×
  • Create New...