decord/source/modules/messages/isSpam.tsx

50 lines
1.3 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 6860
// Function ID: 6861
2026-07-29 08:29:29 +00:00
// Name: isSpamSupported
2026-08-05 07:35:12 +00:00
// Dependencies: [1874, 676, 6861, 2]
2026-07-29 08:29:29 +00:00
// Exports: isSpam, isSpamSupported, isSpammer
2026-07-20 16:05:17 +00:00
2026-08-05 07:35:12 +00:00
// Module 6860 (isSpamSupported)
2026-07-29 08:29:29 +00:00
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) {
2026-08-05 07:35:12 +00:00
flag = !require(6861) /* getDecisionOutcomeFromMessage */.isAutomodMessageRecord(author);
const obj2 = require(6861) /* getDecisionOutcomeFromMessage */;
2026-07-29 08:29:29 +00:00
}
return flag;
2026-07-20 16:05:17 +00:00
};