Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5051.js (118.4 MB)
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
// Module ID: 4770
|
|
// Function ID: 4771
|
|
// Name: AppliedGuildBoostError
|
|
// Dependencies: [4541, 4542, 1091, 1115, 2]
|
|
|
|
// Module 4770 (AppliedGuildBoostError)
|
|
import DurationsDefault from "Durations" /* 1091 */;
|
|
import util from "util" /* 1115 */;
|
|
import DateUtils from "DateUtils" /* 4542 */;
|
|
import V6OrEarlierAPIError from "errors/V6OrEarlierAPIError" /* 4541 */;
|
|
|
|
require = fn;
|
|
class AppliedGuildBoostError extends tmp2 {
|
|
constructor(arg0, arg1) {
|
|
tmp1 = new tmp(global, fn, new.target, tmp);
|
|
if (429 === tmp1.status) {
|
|
tmp1.message = tmp1._getMessageFromRateLimit(global);
|
|
}
|
|
return tmp1;
|
|
}
|
|
}
|
|
AppliedGuildBoostError.prototype["_getMessageFromRateLimit"] = function _getMessageFromRateLimit(body) {
|
|
const diffAsUnitsResult = DateUtils.diffAsUnits(0, body.body.retry_after * DurationsDefault.Millis.SECOND);
|
|
const time = { days: util.t["iXc/Ib"], hours: util.t.WW9P57, minutes: util.t.I7rYev };
|
|
return DateUtils.unitsAsStrings(diffAsUnitsResult, time);
|
|
};
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("errors/AppliedGuildBoostError.tsx");
|
|
|
|
export default AppliedGuildBoostError;
|