decord/source/errors/AppliedGuildBoostError.tsx

33 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 4282
// Function ID: 4283
2026-07-29 08:29:29 +00:00
// Name: _getMessageFromRateLimit
2026-08-24 06:08:38 +00:00
// Dependencies: [4065, 4066, 687, 1236, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 4282 (_getMessageFromRateLimit)
import setDefault from "set" /* 687 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import prototypeDefault from "prototype" /* 4065 */;
import resetCache from "resetCache" /* 4066 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
prototypeDefault;
2026-07-29 08:29:29 +00:00
class AppliedGuildBoostError extends tmp2 {
constructor(arg0, arg1) {
tmp = new tmp(global, arg1, new.target, tmp);
// ThrowIfThisInitialized (0x7c)
if (429 === tmp.status) {
tmp.message = tmp._getMessageFromRateLimit(global);
}
return tmp;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
AppliedGuildBoostError.prototype["_getMessageFromRateLimit"] = function _getMessageFromRateLimit(body) {
2026-08-24 06:08:38 +00:00
let obj = resetCache;
const diffAsUnitsResult = obj.diffAsUnits(0, body.body.retry_after * setDefault.Millis.SECOND);
obj = { days: getSystemLocale.t["iXc/Ib"], hours: getSystemLocale.t.WW9P57, minutes: getSystemLocale.t.I7rYev };
return resetCache.unitsAsStrings(diffAsUnitsResult, obj);
2026-07-29 08:29:29 +00:00
};
const result = require("set").fileFinishedImporting("errors/AppliedGuildBoostError.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default AppliedGuildBoostError;