Closed nishi7409 closed 7 years ago
Please post exactly how you are calling the function.
const blurb = await rbx.getBlurb(args[1] || rbx.getIdFromUserName(args[1]).then(rbx.getBlurb())); if (blurb === token) { // do stuff }
that doesn't look nice so here is an image
It is not a problem with getIdFromUsername, you are calling getBlurb incorrectly. First of all I don't understand the logic in the or. If args[1] exists then use it but if it doesn't call getIdFromUsername with the arg that doesn't exist? I assume you are trying to do something with userIds as well as usernames, but the easiest thing here is to just stick with one. Second you are calling rbx.getBlurb with no arguments when you should just be passing in the function.
const blurb = await rbx.getIdFromUsername(args[1]).then(rbx.getBlurb);
args[1] would be the userid of said player while the rbx.getIdFromUsername(args[1])
is the username.
My idea is... !stuff 12323 or !stuff username > does stuff
The problem is there is no way to identify between the two, someone can have a name that is all numbers that ends up being a valid userId. Anyways, this is not a problem with the module and you should have enough information to work on things on your own now.
Always returns with the account not being able to find the user/user doesn't exist.
Link -
http://prntscr.com/evqqlr