sentanos / roblox-js

!!!THIS PROJECT IS NO LONGER MAINTAINED!!! Execute ROBLOX website actions in node.js
MIT License
45 stars 45 forks source link

getStatus not working properly? #76

Closed nishi7409 closed 6 years ago

nishi7409 commented 6 years ago

Goal: To get the status of a user such as when the user runs !status EliteSilentsword.

Problem: const blurb1 = await rbx.getStatus(rbx.getIdFromUsername(args[1]));

When I run something such as, !status EliteSilentSword, it outputs that the user doesn't exist. Picture - http://prntscr.com/hvshar

When I do something along the lines of... const blurb1 = await rbx.getStatus(args[1]);

And run, !status 60684854, it works perfectly fine!

This is an issue because I don't want a user to be finding their userID even though its simple enough to do. They should just be able to run, !status username, and it should pop up.

sentanos commented 6 years ago

You are not awaiting the getIdFromUsername promise:

const blurb = await rbx.getStatus(await rbx.getIdFromUsername(args[1]));
nishi7409 commented 6 years ago

image

I copied your code exactly, yet I get that error.

I ran, !status EliteSilentSword.

sentanos commented 6 years ago

Works fine for me. Verify args[1] is a string or post code here.

nishi7409 commented 6 years ago

Ah, I see what the problem was.

a) I was updating the wrong portion of the code. b) What was before triggered what was happening.

Thanks though. 👍