32 lines
1.2 KiB
TypeScript
32 lines
1.2 KiB
TypeScript
// Module ID: 4466
|
|
// Function ID: 4467
|
|
// Name: _getMessageFromRateLimit
|
|
// Dependencies: [4241, 4242, 1090, 1114, 2]
|
|
|
|
// Module 4466 (_getMessageFromRateLimit)
|
|
import setDefault from "set" /* 1090 */;
|
|
import getSystemLocale from "getSystemLocale" /* 1114 */;
|
|
import prototypeDefault from "prototype" /* 4241 */;
|
|
import resetCache from "resetCache" /* 4242 */;
|
|
|
|
require = arg1;
|
|
prototypeDefault;
|
|
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;
|
|
}
|
|
}
|
|
AppliedGuildBoostError.prototype["_getMessageFromRateLimit"] = function _getMessageFromRateLimit(body) {
|
|
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);
|
|
};
|
|
const result = require("set").fileFinishedImporting("errors/AppliedGuildBoostError.tsx");
|
|
|
|
export default AppliedGuildBoostError;
|