decord/source/stores/GeoRestrictedGuildStore.tsx

39 lines
1.4 KiB
TypeScript
Raw Normal View History

// Module ID: 13821
// Function ID: 13822
// Name: GeoRestrictedGuildStore
// Dependencies: [504, 573, 2]
2026-07-23 10:11:24 +00:00
// Module 13821 (GeoRestrictedGuildStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
2026-07-20 16:05:17 +00:00
let found = [];
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class GeoRestrictedGuildStore extends Store {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
GeoRestrictedGuildStore.prototype["getGeoRestrictedGuilds"] = function getGeoRestrictedGuilds() {
return found;
2026-07-29 08:29:29 +00:00
};
GeoRestrictedGuildStore.displayName = "GeoRestrictedGuildStore";
const geoRestrictedGuildStore = new GeoRestrictedGuildStore(DispatcherDefault, {
2026-07-20 16:05:17 +00:00
CONNECTION_OPEN: function handleConnectionOpen(geoRestrictedGuilds) {
found = geoRestrictedGuilds.geoRestrictedGuilds;
2026-07-20 16:05:17 +00:00
},
GUILD_DELETE: function handleDeleteGuild(guild) {
guild = guild.guild;
if (-1 === found.findIndex((id) => id.id === guild.id)) {
2026-07-20 16:05:17 +00:00
return false;
} else {
found = found.filter((id) => id.id !== guild.id);
2026-07-20 16:05:17 +00:00
}
},
GUILD_GEO_RESTRICTED: function handleGeoRestrictGuild(guildId) {
found = found.filter((id) => id.id !== guildId.guildId);
2026-07-20 16:05:17 +00:00
found.push({ id: guildId.guildId, name: guildId.name, icon: guildId.icon, unavailable: true, geo_restricted: true });
}
});
const size = fn(2);
const result = size.fileFinishedImporting("stores/GeoRestrictedGuildStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default geoRestrictedGuildStore;