decord/alpha/source/modules/reactions/canAddNewReactions.tsx
github-actions e160b228c5 chore: update source for alpha 348.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4942.js (118.4 MB)
2026-09-22 07:41:18 +00:00

31 lines
1,004 B
TypeScript

// Module ID: 8233
// Function ID: 8234
// Name: canAddNewReactions
// Dependencies: [5632, 4396, 1074, 2]
// Exports: default
// Module 8233 (canAddNewReactions)
import GuildVerificationStore from "GuildVerificationStore" /* 5632 */;
import PermissionStore from "PermissionStore" /* 4396 */;
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;
};