decord/source/modules/explicit_media_redaction/ExplicitMediaManagerUtils.tsx

70 lines
1.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 5033
// Function ID: 5034
2026-07-29 08:29:29 +00:00
// Name: hasAttachmentsEmbedsComponentsOrSnapshots
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: hasAttachmentsEmbedsComponentsOrSnapshots
2026-08-24 06:08:38 +00:00
// Module 5033 (hasAttachmentsEmbedsComponentsOrSnapshots)
import set from "set" /* 2 */;
const result = set.fileFinishedImporting("modules/explicit_media_redaction/ExplicitMediaManagerUtils.tsx");
2026-07-20 16:05:17 +00:00
export const hasAttachmentsEmbedsComponentsOrSnapshots = function hasAttachmentsEmbedsComponentsOrSnapshots(message) {
if (null == message) {
return false;
} else {
const obj = "messageSnapshots" in message ? message.messageSnapshots : message.message_snapshots;
2026-07-29 08:29:29 +00:00
let tmp = null != message.attachments;
if (tmp) {
tmp = message.attachments.length > 0;
}
if (!tmp) {
let tmp2 = null != message.embeds;
if (tmp2) {
tmp2 = message.embeds.length > 0;
}
tmp = tmp2;
}
if (!tmp) {
let tmp3 = null != message.components;
2026-07-20 16:05:17 +00:00
if (tmp3) {
2026-07-29 08:29:29 +00:00
tmp3 = message.components.length > 0;
}
tmp = tmp3;
}
if (!tmp) {
let tmp4 = null != obj;
if (tmp4) {
2026-07-20 16:05:17 +00:00
let someResult;
2026-07-29 08:29:29 +00:00
if (obj != null) {
someResult = obj.some((message) => {
message = message.message;
let tmp = null != message.attachments;
if (tmp) {
tmp = message.attachments.length > 0;
}
if (!tmp) {
let tmp2 = null != message.embeds;
if (tmp2) {
tmp2 = message.embeds.length > 0;
}
tmp = tmp2;
}
if (!tmp) {
let tmp3 = null != message.components;
if (tmp3) {
tmp3 = message.components.length > 0;
}
tmp = tmp3;
}
return tmp;
});
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp4 = someResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = tmp4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp;
2026-07-20 16:05:17 +00:00
}
};