decord/source/modules/guild_settings/GuildSettingsEmojiStore.tsx

78 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 16498
// Function ID: 16499
2026-07-29 08:29:29 +00:00
// Name: initialize
2026-08-05 07:35:12 +00:00
// Dependencies: [16499, 4072, 1386, 687, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-05 07:35:12 +00:00
// Module 16498 (initialize)
2026-07-29 08:29:29 +00:00
import prototype from "prototype";
import handleConnectionOpen from "handleConnectionOpen";
2026-07-23 10:11:24 +00:00
import importDefaultResult from "priv";
2026-07-29 08:29:29 +00:00
import { Store } from "initialize";
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
let closure_2 = {};
let closure_3 = {};
let c4 = 0;
let obj = { max: 5, maxAge: null };
obj[1] = require("set").Millis.HOUR;
2026-07-20 16:05:17 +00:00
importDefaultResult = new importDefaultResult(obj);
2026-07-29 08:29:29 +00:00
let c5 = importDefaultResult;
class GuildSettingsEmojiStore extends Store {
}
const prototype = GuildSettingsEmojiStore.prototype;
prototype["initialize"] = function initialize() {
this.waitFor(handleConnectionOpen);
};
prototype["isUploadingEmoji"] = function isUploadingEmoji() {
return c4 > 0;
};
prototype["getEmojiRevision"] = function getEmojiRevision(id) {
let num = dependencyMap[id];
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return num;
};
prototype["getEmojis"] = function getEmojis(id) {
return dependencyMap2[id];
};
prototype["getEmojiRawAsset"] = function getEmojiRawAsset(arg0) {
return importDefaultResult.get(arg0);
};
GuildSettingsEmojiStore.displayName = "GuildSettingsEmojiStore";
2026-07-20 16:05:17 +00:00
obj = {
EMOJI_DELETE: function handleEmojiDelete(arg0) {
2026-07-29 08:29:29 +00:00
let prototype;
2026-07-20 16:05:17 +00:00
let guildId;
2026-07-29 08:29:29 +00:00
({ guildId, emojiId: prototype } = arg0);
dependencyMap2[guildId] = dependencyMap2[guildId].filter((id) => id.id !== prototype);
2026-07-20 16:05:17 +00:00
},
EMOJI_FETCH_SUCCESS: function handleFetchSuccess(emojis) {
emojis = emojis.emojis;
2026-07-29 08:29:29 +00:00
closure_3[emojis.guildId] = emojis.map((arg0) => new prototype(arg0));
2026-07-20 16:05:17 +00:00
},
EMOJI_FETCH_FAILURE: function handleFetchFailure(guildId) {
2026-07-29 08:29:29 +00:00
closure_3[guildId.guildId] = [];
2026-07-20 16:05:17 +00:00
},
EMOJI_UPLOAD_START: function handleStartUploading() {
2026-07-29 08:29:29 +00:00
closure_4 = closure_4 + 1;
2026-07-20 16:05:17 +00:00
},
EMOJI_UPLOAD_STOP: function handleStopUploading() {
2026-07-29 08:29:29 +00:00
closure_4 = closure_4 - 1;
2026-07-20 16:05:17 +00:00
},
EMOJI_CACHE_RAW_EMOJI_ASSET: function handleCacheRawEmojiAsset(emojiId) {
const result = importDefaultResult.set(emojiId.emojiId, emojiId.userImage);
},
GUILD_EMOJIS_UPDATE: function handleGuildEmojiUpdate(guildId) {
guildId = guildId.guildId;
2026-07-29 08:29:29 +00:00
let num = dependencyMap[guildId];
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
dependencyMap[guildId] = num + 1;
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
const guildSettingsEmojiStore = new GuildSettingsEmojiStore(require("dispatcher"), obj);
let result = require("priv").fileFinishedImporting("modules/guild_settings/GuildSettingsEmojiStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default guildSettingsEmojiStore;