steamutils 1.2.38 → 1.2.40
Sign up to get free protection for your applications and to get access to all the features.
- package/SteamClient.js +2 -0
- package/index.js +34 -0
- package/package.json +1 -1
package/SteamClient.js
CHANGED
@@ -1131,6 +1131,7 @@ function SteamClient({
|
|
1131
1131
|
const personas = await getPersonas([steamId])
|
1132
1132
|
const player_name = personas.find(p => p.id == steamId)?.player_name || ''
|
1133
1133
|
const invite = [`Invited you to play a game!`, `Đã mời bạn chơi một trò chơi!`].includes(data.message_no_bbcode || data.message)
|
1134
|
+
const emotion = (data.message_no_bbcode || '').split(' ').find(m => m.startsWith(':') && m.endsWith(':'))
|
1134
1135
|
|
1135
1136
|
callEvent(events.friendMessage, {
|
1136
1137
|
player_name,
|
@@ -1139,6 +1140,7 @@ function SteamClient({
|
|
1139
1140
|
steamId,
|
1140
1141
|
timestamp,
|
1141
1142
|
from_limited_account: data.from_limited_account,
|
1143
|
+
emotion,
|
1142
1144
|
})
|
1143
1145
|
|
1144
1146
|
});
|
package/index.js
CHANGED
@@ -6019,6 +6019,40 @@ class SteamUser {
|
|
6019
6019
|
return null
|
6020
6020
|
}
|
6021
6021
|
}
|
6022
|
+
|
6023
|
+
async sellItem({
|
6024
|
+
appid = 730,
|
6025
|
+
contextid = 2,
|
6026
|
+
assetid,
|
6027
|
+
amount = 1,
|
6028
|
+
price
|
6029
|
+
}) {
|
6030
|
+
price = parseInt(price)
|
6031
|
+
if (!price) {
|
6032
|
+
return
|
6033
|
+
}
|
6034
|
+
|
6035
|
+
const response = (await this._httpRequestAjax({
|
6036
|
+
url: `market/sellitem`,
|
6037
|
+
data: {
|
6038
|
+
appid: appid,
|
6039
|
+
contextid: contextid,
|
6040
|
+
assetid: assetid,
|
6041
|
+
amount: amount,
|
6042
|
+
price: price,
|
6043
|
+
}
|
6044
|
+
}))?.data
|
6045
|
+
|
6046
|
+
return response
|
6047
|
+
|
6048
|
+
const resultExample = {
|
6049
|
+
"success": true,
|
6050
|
+
"requires_confirmation": 1,
|
6051
|
+
"needs_mobile_confirmation": true,
|
6052
|
+
"needs_email_confirmation": false,
|
6053
|
+
"email_domain": "gmail.com"
|
6054
|
+
}
|
6055
|
+
}
|
6022
6056
|
}
|
6023
6057
|
|
6024
6058
|
export default SteamUser
|