When using the .resolve method and trying to resolve say DimGG's profile instead of getting his SteamID (76561198146931523) I get 76561197961425533. Which happened to be a profile named https. I've found that the regex is removing everything behind the first set of characters (https) instead of everything in front of the users profile name. I've been able to fix it by changing the regex but I'm not 100% certain that this is how the code is intended to work.
I replaced this
async resolve(info) {
if (!info) throw new Error('no info provided');
let steamID, steamURL;
if (/^(?:\/?profiles\/)?\d{17}.*$/.test(info)) {
steamID = info.replace(/^(?:\/?profiles\/)?(\d{17}).*$/, '$1');
} else if (/^(?:\/?id\/)?\w{2,32}.*$/.test(info)) {
steamURL = info.replace(/^(?:\/?id\/)?(\w{2,32}).*$/, '$1');
} else {
With this, in SteamAPI.js
async resolve(info) {
if (!info) throw new Error('no info provided');
let steamID, steamURL;
if (/(\/profiles\/)/.test(info)) {
steamID = info.replace(/.*?(\/profiles\/)/, '');
} else if (/(\/id\/)/.test(info)) {
steamURL = info.replace(/.*?(\/id\/)/, '');
} else {
When using the .resolve method and trying to resolve say DimGG's profile instead of getting his SteamID (76561198146931523) I get 76561197961425533. Which happened to be a profile named https. I've found that the regex is removing everything behind the first set of characters (https) instead of everything in front of the users profile name. I've been able to fix it by changing the regex but I'm not 100% certain that this is how the code is intended to work.
I replaced this
With this, in SteamAPI.js