@sapphire/ratelimits 2.1.0-next.f6bcb67f.0 → 2.1.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/README.md CHANGED
@@ -10,7 +10,6 @@
10
10
  [![codecov](https://codecov.io/gh/sapphiredev/utilities/branch/main/graph/badge.svg?token=OEGIV6RFDO)](https://codecov.io/gh/sapphiredev/utilities)
11
11
  [![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/ratelimits?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@sapphire/ratelimits)
12
12
  [![npm](https://img.shields.io/npm/v/@sapphire/ratelimits?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/ratelimits)
13
- [![Depfu](https://badges.depfu.com/badges/ec42ff3d6bae55eee1de4749960852b3/count.svg)](https://depfu.com/github/sapphiredev/utilities?project_id=15195)
14
13
 
15
14
  </div>
16
15
 
@@ -66,7 +65,7 @@ if (ratelimit.limited) {
66
65
  // Do something when limited, such as throwing an error
67
66
  }
68
67
 
69
- // We're not rate limited so we drip the bucket
68
+ // We're not rate limited so we drip the bucket. After consuming once, the second run through we'll be rate limited.
70
69
  ratelimit.consume();
71
70
 
72
71
  // And now we can finish the flow by returning some form of "success" state.
@@ -89,7 +88,7 @@ if (ratelimit.limited) {
89
88
  // Do something when limited, such as throwing an error
90
89
  }
91
90
 
92
- // We're not rate limited so we drip the bucket. After consuming once, the next run through we'll be rate limited.
91
+ // We're not rate limited so we drip the bucket. After consuming twice, the third run through we'll be rate limited.
93
92
  ratelimit.consume();
94
93
 
95
94
  // And now we can finish the flow by returning some form of "success" state.
@@ -135,17 +134,18 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
135
134
  <td align="center"><a href="https://github.com/Nytelife26"><img src="https://avatars1.githubusercontent.com/u/22531310?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tyler J Russell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Nytelife26" title="Documentation">📖</a></td>
136
135
  <td align="center"><a href="https://github.com/Alcremie"><img src="https://avatars0.githubusercontent.com/u/54785334?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Lieder</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Alcremie" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/issues?q=author%3AAlcremie" title="Bug reports">🐛</a></td>
137
136
  <td align="center"><a href="https://github.com/RealShadowNova"><img src="https://avatars3.githubusercontent.com/u/46537907?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Hezekiah Hendry</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=RealShadowNova" title="Code">💻</a></td>
138
- <td align="center"><a href="https://github.com/Stitch07"><img src="https://avatars.githubusercontent.com/u/29275227?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stitch07</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Code">💻</a> <a href="https://github.com/sapphiredev/utilities/commits?author=Stitch07" title="Tests">⚠️</a></td>
139
137
  <td align="center"><a href="https://github.com/Vetlix"><img src="https://avatars.githubusercontent.com/u/31412314?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vetlix</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Vetlix" title="Code">💻</a></td>
140
138
  <td align="center"><a href="https://github.com/ethamitc"><img src="https://avatars.githubusercontent.com/u/27776796?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ethan Mitchell</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=ethamitc" title="Documentation">📖</a></td>
141
139
  <td align="center"><a href="https://github.com/noftaly"><img src="https://avatars.githubusercontent.com/u/34779161?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=noftaly" title="Code">💻</a></td>
140
+ <td align="center"><a href="https://jurien.dev"><img src="https://avatars.githubusercontent.com/u/5418114?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jurien Hamaker</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=jurienhamaker" title="Code">💻</a></td>
142
141
  </tr>
143
142
  <tr>
144
- <td align="center"><a href="https://jurien.dev"><img src="https://avatars.githubusercontent.com/u/5418114?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jurien Hamaker</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=jurienhamaker" title="Code">💻</a></td>
145
143
  <td align="center"><a href="https://fanoulis.dev/"><img src="https://avatars.githubusercontent.com/u/38255093?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charalampos Fanoulis</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=cfanoulis" title="Documentation">📖</a></td>
146
144
  <td align="center"><a href="https://github.com/apps/dependabot"><img src="https://avatars.githubusercontent.com/in/29110?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dependabot[bot]</b></sub></a><br /><a href="#maintenance-dependabot[bot]" title="Maintenance">🚧</a></td>
147
145
  <td align="center"><a href="https://kaname.netlify.app/"><img src="https://avatars.githubusercontent.com/u/56084970?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kaname</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=kaname-png" title="Code">💻</a></td>
148
146
  <td align="center"><a href="https://github.com/nandhagk"><img src="https://avatars.githubusercontent.com/u/62976649?v=4?s=100" width="100px;" alt=""/><br /><sub><b>nandhagk</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/issues?q=author%3Anandhagk" title="Bug reports">🐛</a></td>
147
+ <td align="center"><a href="https://megatank58.me/"><img src="https://avatars.githubusercontent.com/u/51410502?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Megatank58</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=Megatank58" title="Code">💻</a></td>
148
+ <td align="center"><a href="https://github.com/UndiedGamer"><img src="https://avatars.githubusercontent.com/u/84702365?v=4?s=100" width="100px;" alt=""/><br /><sub><b>UndiedGamer</b></sub></a><br /><a href="https://github.com/sapphiredev/utilities/commits?author=UndiedGamer" title="Code">💻</a></td>
149
149
  </tr>
150
150
  </table>
151
151
 
package/dist/index.umd.js CHANGED
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@sapphire/time-utilities')) :
3
3
  typeof define === 'function' && define.amd ? define(['exports', '@sapphire/time-utilities'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SapphireRatelimits = {}, global.SapphireTimeUtilities));
5
- }(this, (function (exports, timeUtilities) { 'use strict';
5
+ })(this, (function (exports, timeUtilities) { 'use strict';
6
6
 
7
7
  class RateLimit {
8
8
  /**
@@ -181,5 +181,5 @@
181
181
 
182
182
  Object.defineProperty(exports, '__esModule', { value: true });
183
183
 
184
- })));
184
+ }));
185
185
  //# sourceMappingURL=index.umd.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire/ratelimits",
3
- "version": "2.1.0-next.f6bcb67f.0",
3
+ "version": "2.1.0",
4
4
  "description": "Bucket implementation for Ratelimits.",
5
5
  "author": "@sapphire",
6
6
  "license": "MIT",
@@ -9,6 +9,7 @@
9
9
  "browser": "dist/index.umd.js",
10
10
  "unpkg": "dist/index.umd.js",
11
11
  "types": "dist/index.d.ts",
12
+ "typedocMain": "src/index.ts",
12
13
  "exports": {
13
14
  "import": "./dist/index.mjs",
14
15
  "require": "./dist/index.js"
@@ -32,8 +33,8 @@
32
33
  "!dist/*.tsbuildinfo"
33
34
  ],
34
35
  "engines": {
35
- "node": ">=14",
36
- "npm": ">=6"
36
+ "node": ">=v14.18.0",
37
+ "npm": ">=7.24.1"
37
38
  },
38
39
  "keywords": [
39
40
  "@sapphire/ratelimits",
@@ -52,7 +53,7 @@
52
53
  "access": "public"
53
54
  },
54
55
  "dependencies": {
55
- "@sapphire/time-utilities": "^1.4.0-next.f6bcb67f.0"
56
+ "@sapphire/time-utilities": "^1.4.0"
56
57
  },
57
- "gitHead": "f6bcb67f453e8167237bf0b6c03514b14092fda7"
58
+ "gitHead": "18e0df218137b1c05c22fc3c066619e635ffb8dc"
58
59
  }