@turing6/badgeutils

1.0.2 • Public • Published

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)

Readme

Keywords

Package Sidebar

Install

npm i @turing6/badgeutils

Weekly Downloads

2

Version

1.0.2

License

MPL-2.0

Unpacked Size

3.35 kB

Total Files

3

Last publish

Collaborators

  • turing6