@quenty/grouputils 3.3.1-canary.8533eea.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [3.3.1-canary.8533eea.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/grouputils@3.3.0...@quenty/grouputils@3.3.1-canary.8533eea.0) (2021-12-18)
6
+ ## [3.4.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/grouputils@3.4.0...@quenty/grouputils@3.4.1) (2021-12-30)
7
+
8
+ **Note:** Version bump only for package @quenty/grouputils
9
+
10
+
11
+
12
+
13
+
14
+ # [3.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/grouputils@3.3.0...@quenty/grouputils@3.4.0) (2021-12-18)
7
15
 
8
16
  **Note:** Version bump only for package @quenty/grouputils
9
17
 
package/README.md CHANGED
@@ -1,14 +1,21 @@
1
1
  ## GroupUtils
2
2
  <div align="center">
3
- <a href="http://quenty.github.io/api/">
4
- <img src="https://img.shields.io/badge/docs-website-green.svg" alt="Documentation" />
3
+ <a href="http://quenty.github.io/NevermoreEngine/">
4
+ <img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/docs.yml/badge.svg" alt="Documentation status" />
5
5
  </a>
6
6
  <a href="https://discord.gg/mhtGUS8">
7
- <img src="https://img.shields.io/badge/discord-nevermore-blue.svg" alt="Discord" />
7
+ <img src="https://img.shields.io/discord/385151591524597761?color=5865F2&label=discord&logo=discord&logoColor=white" alt="Discord" />
8
8
  </a>
9
9
  <a href="https://github.com/Quenty/NevermoreEngine/actions">
10
10
  <img src="https://github.com/Quenty/NevermoreEngine/actions/workflows/build.yml/badge.svg" alt="Build and release status" />
11
11
  </a>
12
12
  </div>
13
13
 
14
- Group utility functions for Roblox
14
+ Group utility functions for Roblox
15
+
16
+ <div align="center"><a href="https://quenty.github.io/NevermoreEngine/api/GroupUtils">View docs →</a></div>
17
+
18
+ ## Installation
19
+ ```
20
+ npm install @quenty/grouputils --save
21
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/grouputils",
3
- "version": "3.3.1-canary.8533eea.0",
3
+ "version": "3.4.1",
4
4
  "description": "Group utility functions for Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,11 +26,11 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/loader": "3.1.1",
30
- "@quenty/promise": "3.2.1-canary.8533eea.0"
29
+ "@quenty/loader": "^3.1.2",
30
+ "@quenty/promise": "^3.3.1"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "8533eeade3bf6835c0295785c1c326b9abee3222"
35
+ "gitHead": "d146c77d0a8e452824de0ab0b4b03ba0370bcc1b"
36
36
  }
@@ -1,6 +1,7 @@
1
- ---
2
- -- @module GroupUtils
3
- -- @author Quenty
1
+ --[=[
2
+ Helpful functions involving Roblox groups.
3
+ @class GroupUtils
4
+ ]=]
4
5
 
5
6
  local require = require(script.Parent.loader).load(script)
6
7
 
@@ -10,6 +11,13 @@ local Promise = require("Promise")
10
11
 
11
12
  local GroupUtils = {}
12
13
 
14
+ --[=[
15
+ Retrieves the rank of the player in the group.
16
+
17
+ @param player Player
18
+ @param groupId number
19
+ @return Promise<number> -- Generally from 0 to 255
20
+ ]=]
13
21
  function GroupUtils.promiseRankInGroup(player, groupId)
14
22
  assert(typeof(player) == "Instance" and player:IsA("Player"), "Bad player")
15
23
  assert(type(groupId) == "number", "Bad groupId")
@@ -32,6 +40,13 @@ function GroupUtils.promiseRankInGroup(player, groupId)
32
40
  end)
33
41
  end
34
42
 
43
+ --[=[
44
+ Retrieves the role of the player in the group.
45
+
46
+ @param player Player
47
+ @param groupId number
48
+ @return Promise<string>
49
+ ]=]
35
50
  function GroupUtils.promiseRoleInGroup(player, groupId)
36
51
  assert(typeof(player) == "Instance" and player:IsA("Player"), "Bad player")
37
52
  assert(type(groupId) == "number", "Bad groupId")
@@ -54,6 +69,12 @@ function GroupUtils.promiseRoleInGroup(player, groupId)
54
69
  end)
55
70
  end
56
71
 
72
+ --[=[
73
+ Retrieves groupInfo about a group.
74
+
75
+ @param groupId number
76
+ @return Promise<table>
77
+ ]=]
57
78
  function GroupUtils.promiseGroupInfo(groupId)
58
79
  assert(groupId, "Bad groupId")
59
80
 
@@ -75,6 +96,13 @@ function GroupUtils.promiseGroupInfo(groupId)
75
96
  end)
76
97
  end
77
98
 
99
+ --[=[
100
+ Retrieves group role info for a given rankId
101
+
102
+ @param groupId number
103
+ @param rankId number
104
+ @return Promise<table>
105
+ ]=]
78
106
  function GroupUtils.promiseGroupRoleInfo(groupId, rankId)
79
107
  assert(groupId, "Bad groupId")
80
108
  assert(rankId, "Bad rankId")