decord/source/modules/soundboard/useCustomJoinSound.tsx

82 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 5989
// Function ID: 5990
2026-07-29 08:29:29 +00:00
// Name: CustomSoundType
2026-08-08 06:10:11 +00:00
// Dependencies: [1340, 4750, 589, 2]
2026-07-20 16:05:17 +00:00
// Exports: getCustomJoinSound, useCustomJoinSound
2026-08-08 06:10:11 +00:00
// Module 5989 (CustomSoundType)
2026-07-29 08:29:29 +00:00
import handleConnectionClosedOrResumed from "handleConnectionClosedOrResumed";
2026-07-23 10:11:24 +00:00
import { CUSTOM_CALL_SOUND_GLOBAL_GUILD_ID as closure_3 } from "MAX_LENGTH_SOUND_NAME";
const require = arg1;
let obj = { GLOBAL: 0, [0]: "GLOBAL", GUILD: 1, [1]: "GUILD" };
const result = require("initialize").fileFinishedImporting("modules/soundboard/useCustomJoinSound.tsx");
2026-07-20 16:05:17 +00:00
export const CustomSoundType = obj;
export const useCustomJoinSound = function useCustomJoinSound(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-07-29 08:29:29 +00:00
const items = [handleConnectionClosedOrResumed];
return _require(589).useStateFromStores(items, () => {
2026-07-23 10:11:24 +00:00
let guilds = outer1_2.settings.guilds;
2026-07-20 16:05:17 +00:00
guilds = undefined;
2026-07-29 08:29:29 +00:00
if (guilds != null) {
2026-07-20 16:05:17 +00:00
guilds = guilds.guilds;
}
2026-07-29 08:29:29 +00:00
if (guilds == null) {
2026-07-20 16:05:17 +00:00
guilds = {};
}
2026-07-29 08:29:29 +00:00
let joinSound;
if (guilds[closure_0] != null) {
joinSound = tmp.joinSound;
}
if (guilds[outer1_3] != null) {
joinSound = tmp3.joinSound;
}
let tmp4 = joinSound;
if (joinSound == null) {
tmp4 = joinSound;
}
if (null != tmp4) {
const obj = {};
const merged = Object.assign(tmp4);
if (null != joinSound) {
let GLOBAL = outer1_4.GUILD;
} else {
GLOBAL = outer1_4.GLOBAL;
}
obj.type = GLOBAL;
}
2026-07-20 16:05:17 +00:00
});
};
2026-07-29 08:29:29 +00:00
export const getCustomJoinSound = function getCustomJoinSound(currentUser) {
2026-07-20 16:05:17 +00:00
let guilds = settings.settings.guilds;
guilds = undefined;
2026-07-29 08:29:29 +00:00
if (guilds != null) {
2026-07-20 16:05:17 +00:00
guilds = guilds.guilds;
}
2026-07-29 08:29:29 +00:00
if (guilds == null) {
2026-07-20 16:05:17 +00:00
guilds = {};
}
2026-07-29 08:29:29 +00:00
let joinSound;
if (guilds[currentUser] != null) {
joinSound = tmp.joinSound;
}
if (guilds[closure_3] != null) {
joinSound = tmp3.joinSound;
}
let tmp4 = joinSound;
if (joinSound == null) {
tmp4 = joinSound;
}
if (null != tmp4) {
const obj = {};
const merged = Object.assign(tmp4);
if (null != joinSound) {
let GLOBAL = obj.GUILD;
} else {
GLOBAL = obj.GLOBAL;
}
obj.type = GLOBAL;
}
2026-07-20 16:05:17 +00:00
};