decord/source/modules/messages/isSpam.tsx

50 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 5763
// Function ID: 5764
// Name: isSpamSupported
// Dependencies: [1874, 676, 5764, 2]
// Exports: isSpam, isSpamSupported, isSpammer
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
// Module 5763 (isSpamSupported)
import mergeGuildAvatar from "mergeGuildAvatar";
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-07-29 08:29:29 +00:00
let c3;
let c4;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ UserFlags: c3, ChannelTypes: c4 } = ME);
const result = require("getDecisionOutcomeFromMessage").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) {
flag = !require(5764) /* getDecisionOutcomeFromMessage */.isAutomodMessageRecord(author);
const obj2 = require(5764) /* getDecisionOutcomeFromMessage */;
}
return flag;
2026-07-20 16:05:17 +00:00
};