1.0.2 • Published 2 years ago

@turing6/badgeutils v1.0.2

Weekly downloads
-
License
MPL-2.0
Repository
github
Last release
2 years ago

Badge Utils

Utilites for dealing with badges.

Installation

npm install @turing6/badgeutils

Usage

Award a badge:

BadgeUtils.awardBadgeAsync(player, 384836):AndThen(function()
    print("Successfully awarded badge!")
end)

Get badge info:

BadgeUtils.getBadgeInfoAsync(384836):AndThen(function(info)
    print(string.format("Badge `%s` has an image id of '%d' and a description of '%s'!", info.Name, info.IconImageId, info.Description))
end)

Check if a player has a badge:

BadgeUtils.playerHasBadgeAsync(player, 384836):AndThen(function(has)
    if has then
        print("Player has badge!!")
    end
end)