decord/source/modules/reactions/canAddNewReactions.tsx

32 lines
1,004 B
TypeScript
Raw Normal View History

// Module ID: 8045
// Function ID: 8046
// Name: canAddNewReactions
// Dependencies: [5464, 4245, 1074, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 8045 (canAddNewReactions)
import GuildVerificationStore from "GuildVerificationStore" /* 5464 */;
import PermissionStore from "PermissionStore" /* 4245 */;
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;
};