decord/source/modules/reactions/canAddNewReactions.tsx

32 lines
1,004 B
TypeScript
Raw Normal View History

// Module ID: 8087
// Function ID: 8088
// Name: canAddNewReactions
// Dependencies: [5499, 4276, 1074, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 8087 (canAddNewReactions)
import GuildVerificationStore from "GuildVerificationStore" /* 5499 */;
import PermissionStore from "PermissionStore" /* 4276 */;
2026-07-23 10:11:24 +00:00
const Permissions = fn(1074).Permissions;
const size = fn(2);
const result = size.fileFinishedImporting("modules/reactions/canAddNewReactions.tsx");
2026-07-20 16:05:17 +00:00
export default (getGuildId) => {
const guildId = getGuildId.getGuildId();
let canChatInGuildResult = null != guildId;
if (canChatInGuildResult) {
canChatInGuildResult = GuildVerificationStore.canChatInGuild(guildId);
2026-07-20 16:05:17 +00:00
}
if (canChatInGuildResult) {
canChatInGuildResult = PermissionStore.can(Permissions.ADD_REACTIONS, getGuildId);
2026-07-20 16:05:17 +00:00
}
if (!canChatInGuildResult) {
canChatInGuildResult = getGuildId.isPrivate();
}
2026-08-25 06:04:03 +00:00
if (canChatInGuildResult) {
canChatInGuildResult = !getGuildId.isSystemDM();
}
2026-07-20 16:05:17 +00:00
return canChatInGuildResult;
};