Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.
This repository was archived by the owner on Jan 2, 2019. It is now read-only.

GetRankInGroup "undefined"? #104

@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions