decord/source/modules/guild_automod/AutomodAlert.tsx

45 lines
1.3 KiB
TypeScript
Raw Normal View History

// Module ID: 7569
// Function ID: 7570
// Name: AutomodAlert
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: parseAlertActionsExecution
// Module 7569 (AutomodAlert)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const result = size.fileFinishedImporting("modules/guild_automod/AutomodAlert.tsx");
2026-07-20 16:05:17 +00:00
export const AutomodAlertActionType = { SET_COMPLETED: 1, [1]: "SET_COMPLETED", UNSET_COMPLETED: 2, [2]: "UNSET_COMPLETED", DELETE_USER_MESSAGE: 3, [3]: "DELETE_USER_MESSAGE", SUBMIT_FEEDBACK: 4, [4]: "SUBMIT_FEEDBACK" };
export const parseAlertActionsExecution = function parseAlertActionsExecution(rawValue1) {
if (null == rawValue1) {
2026-07-20 16:05:17 +00:00
return null;
} else {
const tmp = (function safeJsonParse(rawValue1) {
if (null == rawValue1) {
2026-07-29 08:29:29 +00:00
return null;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
try {
const _JSON = JSON;
return JSON.parse(rawValue1);
2026-07-29 08:29:29 +00:00
} catch (err) {
return tmp;
2026-07-20 16:05:17 +00:00
}
}
})(rawValue1);
const actions = tmp;
2026-07-29 08:29:29 +00:00
let tmp2 = null;
if (null != tmp) {
tmp2 = null;
if (null != tmp.actions) {
const _Object = Object;
const keys = Object.keys(tmp.actions);
const item = keys.forEach((actionType) => {
2026-08-24 06:08:38 +00:00
actions.actions[actionType].actionType = actionType;
2026-07-29 08:29:29 +00:00
});
tmp2 = tmp;
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp2;
2026-07-20 16:05:17 +00:00
}
};