decord/beta/source/modules/reactions/canAddNewReactions.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

31 lines
1,004 B
TypeScript

// Module ID: 8234
// Function ID: 8235
// Name: canAddNewReactions
// Dependencies: [5632, 4399, 1078, 2]
// Exports: default
// Module 8234 (canAddNewReactions)
import GuildVerificationStore from "GuildVerificationStore" /* 5632 */;
import PermissionStore from "PermissionStore" /* 4399 */;
const Permissions = fn(1078).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;
};