decord/source/modules/guild_communication_disabled/CommunicationDisabledManager.tsx

93 lines
3.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11680
// Function ID: 11681
2026-07-29 08:29:29 +00:00
// Name: clearGuildMemberTimeout
2026-08-24 06:08:38 +00:00
// Dependencies: [1991, 1922, 4013, 709, 5043, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 11680 (clearGuildMemberTimeout)
import set from "set" /* 2 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import isCommunicationDisabled from "isCommunicationDisabled" /* 4013 */;
import initializeDefault from "initialize" /* 5043 */;
import trackCommunicationDisabled from "trackCommunicationDisabled" /* 1991 */;
import closure_5 from "trackCommunicationDisabled" /* 1991 */;
import closure_6 from "mergeGuildAvatar" /* 1922 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
function clearGuildMemberTimeout(closure_2, closure_1) {
member = member.getMember(closure_2, closure_1);
user = user.getUser(closure_1);
2026-07-20 16:05:17 +00:00
if (null != member) {
if (null != user) {
if (!obj6.isMemberCommunicationDisabled(member)) {
let obj = {};
const merged = Object.assign(member);
2026-07-29 08:29:29 +00:00
obj.guildId = closure_2;
2026-07-20 16:05:17 +00:00
let username = member.nick;
2026-07-29 08:29:29 +00:00
if (username == null) {
2026-07-20 16:05:17 +00:00
username = user.username;
}
2026-07-29 08:29:29 +00:00
obj.nick = username;
2026-07-20 16:05:17 +00:00
const avatar = member.avatar;
2026-07-29 08:29:29 +00:00
obj.avatar = avatar;
2026-07-20 16:05:17 +00:00
let tmp5;
if (null != member.avatarDecoration) {
obj = {};
const merged1 = Object.assign(member.avatarDecoration);
2026-07-29 08:29:29 +00:00
tmp5 = obj;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj.avatarDecoration = tmp5;
2026-07-20 16:05:17 +00:00
const premiumSince = member.premiumSince;
2026-07-29 08:29:29 +00:00
obj.premiumSince = premiumSince;
let flag = member.isPending;
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj.isPending = flag;
2026-07-20 16:05:17 +00:00
obj = {};
const merged2 = Object.assign(user);
const email = user.email;
2026-07-29 08:29:29 +00:00
obj.email = email;
2026-07-20 16:05:17 +00:00
const phone = user.phone;
2026-07-29 08:29:29 +00:00
obj.phone = phone;
obj.user = obj;
obj.communicationDisabledUntil = null;
2026-08-24 06:08:38 +00:00
obj1 = { type: "GUILD_MEMBER_UPDATE" };
2026-07-20 16:05:17 +00:00
const merged3 = Object.assign(obj);
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch(obj1);
const obj4 = dispatcherDefault;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj6 = isCommunicationDisabled;
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
({ getGuildIdFromCommunicationDisabledUserKey: c3, getUserIdFromCommunicationDisabledUserKey: c4 } = trackCommunicationDisabled);
let c7 = null;
2026-08-24 06:08:38 +00:00
initializeDefault;
2026-07-29 08:29:29 +00:00
class CommunicationDisabledManager extends tmp3 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.clearGuildMemberTimeout = clearGuildMemberTimeout;
return applyArgumentsResult;
}
}
const prototype = CommunicationDisabledManager.prototype;
prototype["_initialize"] = function _initialize() {
const interval = setInterval(() => {
communicationDisabledUserMap = communicationDisabledUserMap.getCommunicationDisabledUserMap();
const keys = Object.keys(communicationDisabledUserMap);
const item = keys.forEach((arg0) => {
2026-08-24 06:08:38 +00:00
const tmp = closure_1_3(arg0);
const tmp2 = closure_1_4(arg0);
2026-07-29 08:29:29 +00:00
if (!obj.isCommunicationDisabled(communicationDisabledUserMap[arg0])) {
2026-08-24 06:08:38 +00:00
closure_1_8(tmp, tmp2);
2026-07-29 08:29:29 +00:00
}
});
}, 10000);
};
prototype["_terminate"] = function _terminate() {
clearInterval(c7);
};
const communicationDisabledManager = new CommunicationDisabledManager();
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/guild_communication_disabled/CommunicationDisabledManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default communicationDisabledManager;