43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
// Metro module 15446 (f15447).
|
|
import { Endpoints } from "../Constants";
|
|
import { HTTP, rejectWithMigratedError } from "../_bundle/sendRequest";
|
|
const r18 = {
|
|
updateEstimate: async function updateEstimate(c22005_0, r4 = 7) {
|
|
const days = r4;
|
|
const include_roles = arguments[2];
|
|
return (await HTTP.get({
|
|
url: Endpoints.GUILD_PRUNE(c22005_0),
|
|
query: {
|
|
days,
|
|
include_roles
|
|
},
|
|
oldFormErrors: true,
|
|
rejectWithError: rejectWithMigratedError()
|
|
})).body.pruned;
|
|
},
|
|
updateEstimateV2: async function updateEstimateV2(c22006_0, r4 = 7) {
|
|
const days2 = r4;
|
|
const include_roles2 = arguments[2];
|
|
await HTTP.get({
|
|
url: Endpoints.GUILD_PRUNE_V2(c22006_0),
|
|
query: {
|
|
days: days2,
|
|
include_roles: include_roles2
|
|
},
|
|
oldFormErrors: true,
|
|
rejectWithError: rejectWithMigratedError()
|
|
});
|
|
},
|
|
prune: (a0, a1, a2) => HTTP.post({
|
|
url: Endpoints.GUILD_PRUNE(a0),
|
|
body: {
|
|
days: a1,
|
|
compute_prune_count: false,
|
|
include_roles: a2
|
|
},
|
|
oldFormErrors: true,
|
|
rejectWithError: rejectWithMigratedError()
|
|
})
|
|
};
|
|
export default r18;
|