ayiin 2.0.48 → 2.0.49
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/dist/methods/limiter.js +6 -2
- package/package.json +1 -1
package/dist/methods/limiter.js
CHANGED
|
@@ -81,7 +81,9 @@ class Limiter extends tools_1.default {
|
|
|
81
81
|
})
|
|
82
82
|
: (options.messageFormat ??
|
|
83
83
|
`[FloodWait] - Silakan coba lagi dalam ${this.formatRemainingTime(remainingMs)}.`);
|
|
84
|
-
return res
|
|
84
|
+
return res
|
|
85
|
+
.status(429)
|
|
86
|
+
.json({ success: false, error: msg, ms: remainingMs });
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
// ambil level sekarang
|
|
@@ -136,7 +138,9 @@ class Limiter extends tools_1.default {
|
|
|
136
138
|
})
|
|
137
139
|
: (options.messageFormat ??
|
|
138
140
|
`[FloodWait] - Terlalu banyak permintaan. Silakan coba lagi dalam ${this.formatRemainingTime(floodwaitMs)}.`);
|
|
139
|
-
return res
|
|
141
|
+
return res
|
|
142
|
+
.status(429)
|
|
143
|
+
.json({ success: false, error: msg, ms: floodwaitMs });
|
|
140
144
|
}
|
|
141
145
|
next();
|
|
142
146
|
};
|