@mostfeatured/dbi 0.0.71-dev.0 → 0.0.71-dev.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/.hintrc CHANGED
@@ -1,8 +1,8 @@
1
- {
2
- "extends": [
3
- "development"
4
- ],
5
- "hints": {
6
- "typescript-config/strict": "off"
7
- }
1
+ {
2
+ "extends": [
3
+ "development"
4
+ ],
5
+ "hints": {
6
+ "typescript-config/strict": "off"
7
+ }
8
8
  }
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "stuffs": "^0.1.21"
11
11
  },
12
12
  "name": "@mostfeatured/dbi",
13
- "version": "0.0.71-dev.0",
13
+ "version": "0.0.71-dev.1",
14
14
  "main": "dist/index.js",
15
15
  "type": "commonjs",
16
16
  "private": false,
@@ -105,6 +105,10 @@ export function hookInteractionListeners(dbi: DBI<NamespaceEnums>): () => any {
105
105
  await dbi.config.store.set(`RateLimit["${rateLimitKeyMap[type]}"]`, { at: Date.now(), duration });
106
106
  }
107
107
 
108
+ for (const rateLimit of dbiInter.rateLimits) {
109
+ await setRateLimit(rateLimit.type, rateLimit.duration);
110
+ }
111
+
108
112
  let arg = {
109
113
  // @ts-ignore
110
114
  dbi,
@@ -68,6 +68,7 @@ export class DBIBaseInteraction<TNamespace extends NamespaceEnums> {
68
68
  this.options = cfg.options;
69
69
  this.other = cfg.other;
70
70
  this.publish = cfg.publish ?? dbi.data.clients.first()?.namespace;
71
+ this.rateLimits = cfg.rateLimits ?? [];
71
72
  }
72
73
 
73
74
  publish?: NamespaceData[TNamespace]["clientNamespaces"];