decord/source/stores/AppliedGuildBoostStore.tsx

115 lines
3.7 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 11920
// Function ID: 11921
2026-07-29 08:29:29 +00:00
// Name: handleModifyingAppliedBoostStart
// Dependencies: [589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-08 06:10:11 +00:00
// Module 11920 (handleModifyingAppliedBoostStart)
2026-07-29 08:29:29 +00:00
import { Store } from "initialize";
2026-07-20 16:05:17 +00:00
function handleModifyingAppliedBoostStart() {
2026-07-29 08:29:29 +00:00
let c4 = true;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let closure_0 = {};
let c1 = null;
let closure_2 = [];
let c3 = false;
let c4 = false;
let c5 = null;
2026-07-23 10:11:24 +00:00
let c6 = null;
2026-07-29 08:29:29 +00:00
class AppliedGuildBoostStore extends Store {
}
const prototype = AppliedGuildBoostStore.prototype;
prototype["getAppliedGuildBoostsForGuild"] = function getAppliedGuildBoostsForGuild(closure_0) {
let subscriptions = null;
if (null != dependencyMap[closure_0]) {
subscriptions = dependencyMap[closure_0].subscriptions;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return subscriptions;
};
prototype["getLastFetchedAtForGuild"] = function getLastFetchedAtForGuild(closure_0) {
let lastFetchedAt = null;
if (null != dependencyMap[closure_0]) {
lastFetchedAt = dependencyMap[closure_0].lastFetchedAt;
}
return lastFetchedAt;
};
prototype["getCurrentUserAppliedBoosts"] = function getCurrentUserAppliedBoosts() {
return closure_2;
};
prototype["getAppliedGuildBoost"] = function getAppliedGuildBoost(arg0) {
let closure_0 = arg0;
return closure_2.find((id) => id.id === closure_0);
};
Object.defineProperty(prototype, "isModifyingAppliedBoost", {
get: function isModifyingAppliedBoost() {
return c4;
},
set: undefined
});
Object.defineProperty(prototype, "applyBoostError", {
get: function applyBoostError() {
return c5;
},
set: undefined
});
Object.defineProperty(prototype, "unapplyBoostError", {
get: function unapplyBoostError() {
return c6;
},
set: undefined
});
Object.defineProperty(prototype, "cooldownEndsAt", {
get: function cooldownEndsAt(arg0) {
return c1;
},
set: undefined
});
Object.defineProperty(prototype, "isFetchingCurrentUserAppliedBoosts", {
get: function isFetchingCurrentUserAppliedBoosts() {
return c3;
},
set: undefined
});
AppliedGuildBoostStore.displayName = "AppliedGuildBoostStore";
const appliedGuildBoostStore = new AppliedGuildBoostStore(require("dispatcher"), {
2026-07-20 16:05:17 +00:00
GUILD_APPLIED_BOOSTS_FETCH_SUCCESS: function handleAppliedBoostsForGuildFetchSuccess(appliedBoosts) {
2026-07-29 08:29:29 +00:00
closure_0[appliedBoosts.guildId] = { subscriptions: appliedBoosts.appliedBoosts, lastFetchedAt: Date.now() };
2026-07-20 16:05:17 +00:00
},
USER_APPLIED_BOOSTS_FETCH_SUCCESS: function handleAppliedBoostsForuserFetchSuccess(appliedGuildBoosts) {
2026-07-29 08:29:29 +00:00
let c3 = false;
2026-07-20 16:05:17 +00:00
appliedGuildBoosts = appliedGuildBoosts.appliedGuildBoosts;
},
APPLIED_BOOSTS_COOLDOWN_FETCH_SUCCESS: function handleAppliedBoostCooldownFetch(endsAt) {
endsAt = endsAt.endsAt;
},
GUILD_UNAPPLY_BOOST_START: handleModifyingAppliedBoostStart,
GUILD_APPLY_BOOST_START: handleModifyingAppliedBoostStart,
GUILD_APPLY_BOOST_SUCCESS: function handleApplyBoostSuccess(appliedGuildBoost) {
appliedGuildBoost = appliedGuildBoost.appliedGuildBoost;
2026-07-29 08:29:29 +00:00
let set;
set = new Set(appliedGuildBoost.map((id) => id.id));
2026-07-23 10:11:24 +00:00
items = [...appliedGuildBoost, ...items.filter((id) => !set.has(id.id))];
2026-07-29 08:29:29 +00:00
let c5 = null;
let c4 = false;
2026-07-20 16:05:17 +00:00
},
GUILD_APPLY_BOOST_FAIL: function handleApplyBoostFail(error) {
2026-07-29 08:29:29 +00:00
let c4 = false;
2026-07-20 16:05:17 +00:00
error = error.error;
},
GUILD_UNAPPLY_BOOST_SUCCESS: function handleUnapplyBoostSuccess(boostId) {
boostId = boostId.boostId;
2026-07-29 08:29:29 +00:00
closure_2 = closure_2.filter((id) => id.id !== boostId);
let c4 = false;
2026-07-20 16:05:17 +00:00
},
GUILD_UNAPPLY_BOOST_FAIL: function handleUnapplyBoostFail(error) {
2026-07-29 08:29:29 +00:00
let c4 = false;
2026-07-20 16:05:17 +00:00
error = error.error;
},
USER_APPLIED_BOOSTS_FETCH_START: function handleUserAppliedBoostsFetchStart() {
2026-07-29 08:29:29 +00:00
let c3 = true;
2026-07-20 16:05:17 +00:00
}
});
2026-07-29 08:29:29 +00:00
const result = require("set").fileFinishedImporting("stores/AppliedGuildBoostStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default appliedGuildBoostStore;