decord/source/modules/reactions/canAddNewReactions.tsx

30 lines
914 B
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8231
// Function ID: 8232
// Dependencies: [5238, 4025, 676, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 8231
import closure_0 from "recomputeGuild" /* 5238 */;
import closure_1 from "getUncachedChannelPermissions" /* 4025 */;
2026-08-24 06:08:38 +00:00
import { Permissions } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const result = require("set").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) {
2026-08-24 06:08:38 +00:00
canChatInGuildResult = closure_0.canChatInGuild(guildId);
2026-07-20 16:05:17 +00:00
}
if (canChatInGuildResult) {
2026-08-24 06:08:38 +00:00
canChatInGuildResult = closure_1.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;
};