decord/beta/source/modules/reactions/canAddNewReactions.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

31 lines
1,004 B
TypeScript

// Module ID: 8266
// Function ID: 8267
// Name: canAddNewReactions
// Dependencies: [5664, 4431, 1078, 2]
// Exports: default
// Module 8266 (canAddNewReactions)
import GuildVerificationStore from "GuildVerificationStore" /* 5664 */;
import PermissionStore from "PermissionStore" /* 4431 */;
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;
};