Update Noblox to 6.0.2

This commit is contained in:
2024-08-27 23:11:28 -05:00
parent d1066e2737
commit 37e691eebf
4 changed files with 8 additions and 24 deletions

@ -90,24 +90,6 @@ async function buyModel(modelId) {
return res.statusCode >= 200 && res.statusCode < 300 && resJson.purchaseTransactionStatus === "PURCHASE_TRANSACTION_STATUS_SUCCESS";
}
async function getCurrentUser() {
const jar = noblox.options.jar;
const xcsrf = await noblox.getGeneralToken(jar);
const res = await noblox.http("https://users.roblox.com/v1/users/authenticated", {
method: "GET",
resolveWithFullResponse: true,
jar: jar,
headers: {
"X-CSRF-TOKEN": xcsrf,
"Content-Type": "application/json"
}
});
const resJson = JSON.parse(res.body);
return resJson.id;
}
const SubmissionColumnsString = "map_id,unix_timestamp,user_id,username,display_name,creator\n";
const SubmissionColumn = {
@ -366,4 +348,4 @@ function getValidationMessage(validation, game, errorOnFail) {
return msg;
}
module.exports = { AssetType, getAssetInfo, buyModel, getCurrentUser, SubmissionColumn, SubmissionColumnsString, getSubmissionLine, createSubmissionLine, validateMapAsset, getValidationMessage, safeCsvFormat };
module.exports = { AssetType, getAssetInfo, buyModel, SubmissionColumn, SubmissionColumnsString, getSubmissionLine, createSubmissionLine, validateMapAsset, getValidationMessage, safeCsvFormat };