@quenty/marketplaceutils 6.3.0 → 6.3.1-canary.345.60686f2.0

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,6 +3,17 @@
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
+ ## [6.3.1-canary.345.60686f2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/marketplaceutils@6.3.0...@quenty/marketplaceutils@6.3.1-canary.345.60686f2.0) (2023-03-31)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add MarketplaceUtils.promisePlayerOwnsBundle(player, bundleId) ([b2dbcbb](https://github.com/Quenty/NevermoreEngine/commit/b2dbcbb8b2e002fdf519e71a73a7fcba1e4a2f5c))
12
+
13
+
14
+
15
+
16
+
6
17
  # [6.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/marketplaceutils@6.2.0...@quenty/marketplaceutils@6.3.0) (2023-03-05)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/marketplaceutils
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014-2022 Quenty
3
+ Copyright (c) 2014-2023 James Onnen (Quenty)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/marketplaceutils",
3
- "version": "6.3.0",
3
+ "version": "6.3.1-canary.345.60686f2.0",
4
4
  "description": "Provides utility methods for MarketplaceService",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,11 +26,11 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/loader": "^6.2.0",
30
- "@quenty/promise": "^6.3.0"
29
+ "@quenty/loader": "6.2.0",
30
+ "@quenty/promise": "6.3.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "e62b5eac2e5d9084ab9083f128452dd2d98b6f1a"
35
+ "gitHead": "60686f2af2e3db9a768ca47d2636bf84ea263494"
36
36
  }
@@ -173,4 +173,29 @@ function MarketplaceUtils.promisePlayerOwnsAsset(player, assetId)
173
173
  end)
174
174
  end
175
175
 
176
+ --[=[
177
+ Retrieves whether a player owns a bundle
178
+ @param player Player
179
+ @param bundleId number
180
+ @return Promise<boolean>
181
+ ]=]
182
+ function MarketplaceUtils.promisePlayerOwnsBundle(player, bundleId)
183
+ assert(typeof(player) == "Instance", "Bad player")
184
+ assert(type(bundleId) == "number", "Bad bundleId")
185
+
186
+ return Promise.spawn(function(resolve, reject)
187
+ local result
188
+ local ok, err = pcall(function()
189
+ result = MarketplaceService:PlayerOwnsBundle(player, bundleId)
190
+ end)
191
+ if not ok then
192
+ return reject(err)
193
+ end
194
+ if type(result) ~= "boolean" then
195
+ return reject("Bad result type")
196
+ end
197
+ return resolve(result)
198
+ end)
199
+ end
200
+
176
201
  return MarketplaceUtils