decord/source/modules/messages/isSpam.tsx

49 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 5236
// Function ID: 5237
2026-07-29 08:29:29 +00:00
// Name: isSpamSupported
2026-08-24 06:08:38 +00:00
// Dependencies: [1922, 676, 5237, 2]
2026-07-29 08:29:29 +00:00
// Exports: isSpam, isSpamSupported, isSpammer
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 5236 (isSpamSupported)
import getDecisionOutcomeFromMessage from "getDecisionOutcomeFromMessage" /* 5237 */;
import closure_2 from "mergeGuildAvatar" /* 1922 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-29 08:29:29 +00:00
({ UserFlags: c3, ChannelTypes: c4 } = ME);
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/messages/isSpam.tsx");
2026-07-20 16:05:17 +00:00
export const isSpamSupported = function isSpamSupported(type) {
let tmp = undefined !== type;
if (tmp) {
tmp = type.type !== constants2.DM;
}
return tmp;
};
2026-07-29 08:29:29 +00:00
export const isSpammer = function isSpammer(userId) {
const user = authStore.getUser(userId);
let flag;
if (user != null) {
flag = user.hasFlag(constants.SPAMMER);
}
if (flag == null) {
flag = false;
}
return flag;
};
2026-07-20 16:05:17 +00:00
export const isSpam = function isSpam(author) {
2026-07-29 08:29:29 +00:00
const user = authStore.getUser(author.author.id);
let flag;
if (user != null) {
flag = user.hasFlag(constants.SPAMMER);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (flag == null) {
flag = false;
}
if (flag) {
2026-08-24 06:08:38 +00:00
flag = !getDecisionOutcomeFromMessage.isAutomodMessageRecord(author);
const obj2 = getDecisionOutcomeFromMessage;
2026-07-29 08:29:29 +00:00
}
return flag;
2026-07-20 16:05:17 +00:00
};