decord/source/modules/messages/isSpam.tsx
2026-08-25 06:04:03 +00:00

48 lines
1.3 KiB
TypeScript

// Module ID: 7113
// Function ID: 7114
// Name: isSpamSupported
// Dependencies: [1922, 676, 7114, 2]
// Exports: isSpam, isSpamSupported, isSpammer
// Module 7113 (isSpamSupported)
import getDecisionOutcomeFromMessage from "getDecisionOutcomeFromMessage" /* 7114 */;
import closure_2 from "mergeGuildAvatar" /* 1922 */;
import ME from "ME" /* 676 */;
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;
};