-
Posts
6 -
Joined
-
Last visited
Reputation Activity
-
R3v3rso reacted to Dr. McKay in Get steam keys from a file ?
The first problem I see is that you aren't handling the callback to offer.accept, which could fail.
Secondly, you can use the fs module to read from a file. If it's newline-delimited, you could call split("\n") to get an array containing each line in the file.
-
R3v3rso reacted to Dr. McKay in How to check if the items received are trading cards ?
Do something like this:
let isEachItemATradingCard = theirItems.every((item) => { if (item.appid != 753 || item.contextid != 6) { // AppID is not "Steam" or contextid is not "Community" return false; } let tag = item.getTag('item_class'); if (!tag || tag.internal_name != 'item_class_2') { // Not a trading card // You could also check that tag.localized_tag_name == 'Trading Card' but that would only work for English return false; } return true; // all checks passed });