decord/source/modules/soundboard/useCustomJoinSound.tsx

85 lines
2.2 KiB
TypeScript
Raw Normal View History

// Module ID: 7447
// Function ID: 7448
// Name: useCustomJoinSound
// Dependencies: [1221, 5065, 504, 2]
2026-07-20 16:05:17 +00:00
// Exports: getCustomJoinSound, useCustomJoinSound
// Module 7447 (useCustomJoinSound)
import UserSettingsProtoStore from "UserSettingsProtoStore" /* 1221 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-07-20 16:05:17 +00:00
const require = fn;
let closure_3 = fn(5065).CUSTOM_CALL_SOUND_GLOBAL_GUILD_ID;
const CustomSoundType = { GLOBAL: 0, [0]: "GLOBAL", GUILD: 1, [1]: "GUILD" };
const size = fn(2);
const result = size.fileFinishedImporting("modules/soundboard/useCustomJoinSound.tsx");
export { CustomSoundType };
2026-07-20 16:05:17 +00:00
export const useCustomJoinSound = function useCustomJoinSound(arg0) {
_require = arg0;
const items = [UserSettingsProtoStore];
return require("initialize").useStateFromStores(items, () => {
const guilds = UserSettingsProtoStore.settings.guilds;
let guilds1;
2026-07-29 08:29:29 +00:00
if (guilds != null) {
guilds1 = guilds.guilds;
2026-07-20 16:05:17 +00:00
}
if (guilds1 == null) {
guilds1 = {};
2026-07-20 16:05:17 +00:00
}
let joinSound1;
if (guilds1[closure_0] != null) {
joinSound1 = tmp.joinSound;
2026-07-29 08:29:29 +00:00
}
if (guilds1[closure_3] != null) {
const joinSound = tmp3.joinSound;
2026-07-29 08:29:29 +00:00
}
let tmp4 = joinSound1;
if (joinSound1 == null) {
2026-07-29 08:29:29 +00:00
tmp4 = joinSound;
}
if (null != tmp4) {
const obj = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(tmp4);
if (null != joinSound1) {
let GLOBAL = obj.GUILD;
2026-07-29 08:29:29 +00:00
} else {
GLOBAL = obj.GLOBAL;
2026-07-29 08:29:29 +00:00
}
obj.type = GLOBAL;
}
2026-07-20 16:05:17 +00:00
});
};
export const getCustomJoinSound = function getCustomJoinSound(arg0) {
const guilds = UserSettingsProtoStore.settings.guilds;
let guilds1;
2026-07-29 08:29:29 +00:00
if (guilds != null) {
guilds1 = guilds.guilds;
2026-07-20 16:05:17 +00:00
}
if (guilds1 == null) {
guilds1 = {};
2026-07-20 16:05:17 +00:00
}
let joinSound1;
if (guilds1[arg0] != null) {
joinSound1 = tmp.joinSound;
2026-07-29 08:29:29 +00:00
}
if (guilds1[closure_3] != null) {
const joinSound = tmp3.joinSound;
2026-07-29 08:29:29 +00:00
}
let tmp4 = joinSound1;
if (joinSound1 == null) {
2026-07-29 08:29:29 +00:00
tmp4 = joinSound;
}
if (null != tmp4) {
const obj = {};
2026-07-29 08:29:29 +00:00
const merged = Object.assign(tmp4);
if (null != joinSound1) {
2026-07-29 08:29:29 +00:00
let GLOBAL = obj.GUILD;
} else {
GLOBAL = obj.GLOBAL;
}
obj.type = GLOBAL;
}
2026-07-20 16:05:17 +00:00
};