decord/source/modules/reactions/canAddNewReactions.tsx

27 lines
830 B
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10950
// Function ID: 10951
// Dependencies: [4982, 4024, 676, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 10950
import closure_0 from "recomputeGuild" /* 4982 */;
import closure_1 from "getUncachedChannelPermissions" /* 4024 */;
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();
}
return canChatInGuildResult;
};