decord/source/utils/ChatRestrictions.tsx
2026-08-28 06:19:39 +00:00

75 lines
2.6 KiB
TypeScript

// Module ID: 10271
// Function ID: 10272
// Name: items
// Dependencies: [676, 10272, 1236, 2]
// Module 10271 (items)
import set from "set" /* 2 */;
import ME from "ME" /* 676 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import parsedItemUsesEveryoneRoleDefault from "parsedItemUsesEveryoneRole" /* 10272 */;
const TOKEN_REGEX = ME.TOKEN_REGEX;
const items = [
{
check(arg0, getGuildId) {
if (arg2) {
if (null == getGuildId.getGuildId()) {
return false;
} else {
const extractEveryoneRoleResult = parsedItemUsesEveryoneRoleDefault.extractEveryoneRole(arg0, getGuildId);
if (null == extractEveryoneRoleResult) {
return false;
} else {
let tmp8Result = tmp8(10272);
if (tmp8Result.shouldShowEveryoneGuard(extractEveryoneRoleResult, getGuildId)) {
tmp8Result = tmp8(10272);
const everyoneMemberCountResult = tmp8Result.everyoneMemberCount(extractEveryoneRoleResult, getGuildId);
const _Math = Math;
const _Math2 = Math;
const _Math3 = Math;
const powResult = Math.pow(10, Math.floor(Math.log10(everyoneMemberCountResult)));
if (getGuildId.isForumPost()) {
} else if (getGuildId.isThread()) {
}
let obj = { body: null, footer: null };
const intl = tmp6(1236).intl;
obj = { role: null, count: null };
obj[0] = extractEveryoneRoleResult;
const _Math4 = Math;
const result = Math.trunc(everyoneMemberCountResult / powResult) * powResult;
obj[1] = result.toLocaleString();
obj[0] = intl.formatToPlainString(_2YaiQ1, obj);
const intl2 = tmp6(1236).intl;
obj[1] = intl2.string(getSystemLocale.t.mVyrtu);
return obj;
} else {
return false;
}
}
const obj5 = parsedItemUsesEveryoneRoleDefault;
}
} else {
return false;
}
},
analyticsType: "@Everyone Warning",
animation: "accessibilityRole"
},
{
check(arg0) {
let isMatch = TOKEN_REGEX.test(arg0);
if (isMatch) {
const obj = { body: null };
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t.sTwS1a);
isMatch = obj;
}
return isMatch;
},
analyticsType: "API Token Warning"
}
];
let result = set.fileFinishedImporting("utils/ChatRestrictions.tsx");
export const RESTRICTIONS = items;