decord/source/modules/messages/isSpam.tsx
github-actions cd74c1f217 chore: update source for alpha 345.5
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9667_m.js (378 MB)
2026-09-05 10:56:28 +00:00

48 lines
1.3 KiB
TypeScript

// Module ID: 7507
// Function ID: 7508
// Name: isSpamSupported
// Dependencies: [1371, 1074, 7508, 2]
// Exports: isSpam, isSpamSupported, isSpammer
// Module 7507 (isSpamSupported)
import getDecisionOutcomeFromMessage from "getDecisionOutcomeFromMessage" /* 7508 */;
import closure_2 from "mergeGuildAvatar" /* 1371 */;
import ME from "ME" /* 1074 */;
require = arg1;
({ UserFlags: c3, ChannelTypes: c4 } = ME);
const result = require("set").fileFinishedImporting("modules/messages/isSpam.tsx");
export const isSpamSupported = function isSpamSupported(type) {
let tmp = undefined !== type;
if (tmp) {
tmp = type.type !== constants2.DM;
}
return tmp;
};
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;
};
export const isSpam = function isSpam(author) {
const user = authStore.getUser(author.author.id);
let flag;
if (user != null) {
flag = user.hasFlag(constants.SPAMMER);
}
if (flag == null) {
flag = false;
}
if (flag) {
flag = !getDecisionOutcomeFromMessage.isAutomodMessageRecord(author);
const obj2 = getDecisionOutcomeFromMessage;
}
return flag;
};