sentanos / roblox-js

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

GetRankInGroup "undefined"? #104

Open ghost opened 6 years ago

ghost commented 6 years ago

Im trying to make a lvl up group system but it always errors:

Code:

async function returnrank(id) {
        var able2 = true
        try {
            const rank = await Roblox.getRankInGroup(3576137,id)
        }
        catch(err) {
            able2 = false
        };
        if(able2 == true) {
            const rank = await Roblox.getRankInGroup(3576137,id)
            .then(function (therank) {
            return rank -- Error line
            });
        } else {
            message.reply('you are not in the roblox group! Please join it to recive your rank!')
            return null
        };
    }    

Error: (node:4) UnhandledPromiseRejectionWarning: ReferenceError: rank is not defined

ghost commented 6 years ago

Is this my code or that the group functions have stopped working?

suufi commented 6 years ago

Please use async/await properly. Don't open another issue that's not related to the library directly; use the ROBLOX API Discord Server instead.

On Tue, Jun 12, 2018 at 20:59 OutlookG notifications@github.com wrote:

Is this my code or that the group functions have stopped working?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sentanos/roblox-js/issues/104#issuecomment-396780345, or mute the thread https://github.com/notifications/unsubscribe-auth/AMKxJJvxbzde02wt5dkbmE6JvZIpyYh_ks5t8GPrgaJpZM4Uh1Dj .

ghost commented 6 years ago

im using it like you said, I put it in a async function, but it did not work. It came out as "pending"

Neztore commented 6 years ago

Clearly not. Please join the discord and send your code in the correct channel.

If it is "pending" you aren't using them properly.

ghost commented 6 years ago

can not find the link to join the discord server.

ghost commented 6 years ago

The discord channel did not help out one bit. They were not willing to help and were very rude.

0q0-Team commented 6 years ago

Feel free to check out our project and assistance team at https://discord.0q0.eu/ ! Regards!

ghost commented 6 years ago

Was able to fix it all by my self. Without the help of your discord or any of you.