Class: BotAccount

BotAccount

new BotAccount()

Creates a new BotAccount instance for a bot.
Source:

Methods

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:

generateMobileAuthenticationCode() → {Error|String}

Generate two-factor-authentication code used for logging in.
Source:
Returns:
Type
Error | String

generateMobileConfirmationCode(time, tag) → {Error}

Parameters:
Name Type Description
time Current time of trade (Please use getUnixTime())
tag Type of confirmation required ("conf" to load the confirmations page, "details" to load details about a trade, "allow" to confirm a trade, "cancel" to cancel it.)
Source:
Returns:
Type
Error

getAccount() → {*|Object}

Get account details
Source:
Returns:
Type
* | Object

getAccountName() → {String}

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

getConfirmations(time, key, confirmationsCallback)

Get outstanding confirmations
Parameters:
Name Type Description
time
key
confirmationsCallback
Source:

getDisplayName() → {String|null}

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

getUnixTime() → {number}

Get Unix time for usage with mobile confirmations.
Source:
Returns:
Type
number

sendMessage(recipient, message)

Send a chat message to a steam user
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:

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:

steamGuard

Emitted when Steam requests a Steam Guard code from us. You should collect the code from the user somehow and then call the callback with the code as the sole argument.
Type:
  • object
Properties:
Name Type Description
domain String If an email code is needed, the domain name of the address where the email was sent. null if an app code is needed.
callbackSteamGuard Callback Should be called when the code is available.
lastCodeWrong Boolean true if you're using 2FA and the last code you provided was wrong, false otherwise
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:

updatedAccountDetails

Updated an account's details (such as: username, password, sessionid, cookies...)
Source: