decord/alpha/source/modules/reactions/canAddNewReactions.tsx
github-actions 45f5884862 chore: update source for alpha 348.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5012.js (118.4 MB)
2026-09-23 06:49:31 +00:00

31 lines
1,004 B
TypeScript

// Module ID: 8315
// Function ID: 8316
// Name: canAddNewReactions
// Dependencies: [5716, 4462, 1074, 2]
// Exports: default
// Module 8315 (canAddNewReactions)
import GuildVerificationStore from "GuildVerificationStore" /* 5716 */;
import PermissionStore from "PermissionStore" /* 4462 */;
const Permissions = fn(1074).Permissions;
const size = fn(2);
const result = size.fileFinishedImporting("modules/reactions/canAddNewReactions.tsx");
export default (getGuildId) => {
const guildId = getGuildId.getGuildId();
let canChatInGuildResult = null != guildId;
if (canChatInGuildResult) {
canChatInGuildResult = GuildVerificationStore.canChatInGuild(guildId);
}
if (canChatInGuildResult) {
canChatInGuildResult = PermissionStore.can(Permissions.ADD_REACTIONS, getGuildId);
}
if (!canChatInGuildResult) {
canChatInGuildResult = getGuildId.isPrivate();
}
if (canChatInGuildResult) {
canChatInGuildResult = !getGuildId.isSystemDM();
}
return canChatInGuildResult;
};