decord/source/modules/guild_settings/GuildSettingsEmojiStore.tsx

79 lines
2.6 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16876
// Function ID: 16877
2026-07-29 08:29:29 +00:00
// Name: initialize
2026-08-24 06:08:38 +00:00
// Dependencies: [16877, 4201, 1405, 687, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
// Module 16876 (initialize)
import initializeDefault from "initialize" /* 589 */;
import setDefault from "set" /* 687 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import closure_0 from "prototype" /* 16877 */;
import closure_1 from "handleConnectionOpen" /* 4201 */;
import importDefaultResult from "priv" /* 1405 */;
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 };
2026-08-24 06:08:38 +00:00
obj[1] = setDefault.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;
2026-08-24 06:08:38 +00:00
const Store = initializeDefault.Store;
2026-07-29 08:29:29 +00:00
class GuildSettingsEmojiStore extends Store {
}
const prototype = GuildSettingsEmojiStore.prototype;
prototype["initialize"] = function initialize() {
2026-08-24 06:08:38 +00:00
this.waitFor(closure_1);
2026-07-29 08:29:29 +00:00
};
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-08-24 06:08:38 +00:00
({ guildId, emojiId: closure_0 } = arg0);
dependencyMap2[guildId] = dependencyMap2[guildId].filter((id) => id.id !== closure_0);
2026-07-20 16:05:17 +00:00
},
EMOJI_FETCH_SUCCESS: function handleFetchSuccess(emojis) {
emojis = emojis.emojis;
2026-08-24 06:08:38 +00:00
closure_3[emojis.guildId] = emojis.map((arg0) => new closure_0(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-08-24 06:08:38 +00:00
const guildSettingsEmojiStore = new GuildSettingsEmojiStore(dispatcherDefault, obj);
let result = require("set").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;