Class: BotAccount

BotAccount

new BotAccount()

Creates a new BotAccount instance for a bot.
Source:

Methods

addPhoneNumber(phoneNumber, errorCallback)

Add a phone-number to the account (For example before setting up 2-factor authentication)
Parameters:
Name Type Description
phoneNumber Certain format must be followed
errorCallback errorCallback A callback returned with possible errors
Source:

addToQueue(functionV, functionData)

Add a function to the queue which runs when we login usually.
Parameters:
Name Type Description
functionV
functionData
Source:

changeName(newName, namePrefix, errorCallback)

Change the display name of the account (with prefix)
Parameters:
Name Type Description
newName String The new display name
namePrefix String The prefix if there is one (Nullable)
errorCallback errorCallback A callback returned with possible errors
Source:

confirmTradesFromUser(steamID, acceptedTradesCallback)

Confirm (not accept) all sent trades associated with a certain SteamID via the two-factor authenticator.
Parameters:
Name Type Description
steamID SteamID SteamID to use for lookup of inventory
acceptedTradesCallback acceptedTradesCallback Inventory details (refer to inventoryCallback for more info.)
Source:

downvoteSharedFile(sharedFileId, callback)

Downvote an attachement file on SteamCommunity.
Parameters:
Name Type Description
sharedFileId
callback
Source:

fromIndividualAccountID() → {Error|String}

Fetch SteamID Object from the SteamID.
Source:
Returns:
Type
Error | String

getAccount() → {*|Object}

Get account details
Source:
Returns:
Type
* | Object

getAccountName() → {String}

Get the account's username, used to login to Steam
Source:
Returns:
username
Type
String

getDisplayName() → {String|undefined}

Get the display name of the account
Source:
Returns:
displayName - Display name of the account
Type
String | undefined

getInventory(appid, contextid, tradableOnly, inventoryCallback)

Retrieve account inventory based on filters
Parameters:
Name Type Description
appid Integer appid by-which to fetch inventory based on.
contextid Integer contextid of lookup (1 - Gifts, 2 - In-game Items, 3 - Coupons, 6 - Game Cards, Profile Backgrounds & Emoticons)
tradableOnly Boolean Items retrieved must be tradable
inventoryCallback inventoryCallback Inventory details (refer to inventoryCallback for more info.)
Source:

getRateLimited() → {Boolean}

Get if the API/account is rate limited by SteamAPI
Source:
Returns:
rateLimited
Type
Boolean

getRequestAPI(apiInterface, version, method, options, callbackRequestAPI)

Send GET Request to SteamAPI with details
Parameters:
Name Type Description
apiInterface (String) - Interface name
version (String) - Interface version (v1 or v2 depending on interface)
method (String) - method to access
options Data to attach to request
callbackRequestAPI -
Source:

getUserInventory(steamID, appid, contextid, tradableOnly, inventoryCallback)

Retrieve account inventory based on filters and provided steamID
Parameters:
Name Type Description
steamID SteamID SteamID to use for lookup of inventory
appid Integer appid by-which to fetch inventory based on.
contextid Integer contextid of lookup (1 - Gifts, 2 - In-game Items, 3 - Coupons, 6 - Game Cards, Profile Backgrounds & Emoticons)
tradableOnly Boolean Items retrieved must be tradableOnly
inventoryCallback inventoryCallback Inventory details (refer to inventoryCallback for more info.)
Source:

loggedInAccount(cookies, sessionID, loginCallback)

This is a private method - but incase you would like to edit it for your own usage...
Parameters:
Name Type Description
cookies Cookies sent by Steam when logged in
sessionID Session ID as sent by Steam
loginCallback loginCallback Login details (refer to loginCallback for more info.)
Source:

processQueue(queueName, callback)

Process the queue to run tasks that were delayed.
Parameters:
Name Type Description
queueName
callback
Source:

sendMessage(recipient, message, callback)

Send a chat message to a receipient with callback
Parameters:
Name Type Description
recipient SteamID Recipient of the message
message String Message to send
callback messageCallback Callback upon sending the message (undefined, or Error)
Source:

sendMessage(recipient, message, type, callback)

Send a chat message to a receipient with callback
Parameters:
Name Type Description
recipient SteamID Recipient of the message
message String Message to send
type String saytest or typing (message ignored for 'typing')
callback messageCallback Callback upon sending the message (undefined, or Error)
Source:

sendMessage(recipient, message)

Send a chat message to a receipient without callback
Parameters:
Name Type Description
recipient SteamID Recipient of the message
message String Message to send
Source:

setChatting(chattingUserInfo)

Set the user we are chatting with
Parameters:
Name Type Description
chattingUserInfo * | Object
Source:

setRateLimited() → {Boolean}

Get if the API/account is rate limited by SteamAPI
Source:
Returns:
rateLimited
Type
Boolean

TradeManager() → {String}

Get the account's username, used to login to Steam
Source:
Returns:
username
Type
String

upvoteSharedFile(sharedFileId, callback)

Upvote an attachement file on SteamCommunity
Parameters:
Name Type Description
sharedFileId
callback
Source:

wrapFunction(fn, context, params) → {function}

Function wrapper used to delay function calls by name and paramters
Parameters:
Name Type Description
fn function reference
context Context to use for call
params Parameters in arraylist to send with function
Source:
Returns:
Type
function

Events

friendOrChatMessage

Emitted when a friend message or chat room message is received.
Type:
  • object
Properties:
Name Type Description
senderID SteamID The message sender, as a SteamID object
message String The message text
room SteamID The room to which the message was sent. This is the user's SteamID if it was a friend message
Source:

loggedIn

Emitted when we fully sign into Steam and all functions are usable.
Source:

newOffer

Emitted when we receive a new trade offer
Type:
  • object
Properties:
Name Type Description
offer TradeOffer The offer's details
Source:

offerChanged

Emitted when a trade offer changes state (Ex. accepted, pending, escrow, etc...)
Type:
  • object
Properties:
Name Type Description
offer TradeOffer The new offer's details
oldState TradeOffer The old offer's details
Source:

tradeOffers

Emitted when a trade offer is cancelled
Type:
  • object
Properties:
Name Type Description
count Integer The amount of active trade offers (can be 0).
Source:

tradeOffers

Emitted when we receive a new trade offer notification (only provides amount of offers and no other details)
Type:
  • object
Properties:
Name Type Description
count Integer The amount of active trade offers (can be 0).
Source:

tradeOffers

Emitted when a trade offer is cancelled
Type:
  • object
Properties:
Name Type Description
count Integer The amount of active trade offers (can be 0).
Source:

tradeOffers

Emitted when a trade offer is cancelled
Type:
  • object
Properties:
Name Type Description
count Integer The amount of active trade offers (can be 0).
Source: