Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
31 lines
1,004 B
TypeScript
31 lines
1,004 B
TypeScript
// Module ID: 8087
|
|
// Function ID: 8088
|
|
// Name: canAddNewReactions
|
|
// Dependencies: [5499, 4276, 1074, 2]
|
|
// Exports: default
|
|
|
|
// Module 8087 (canAddNewReactions)
|
|
import GuildVerificationStore from "GuildVerificationStore" /* 5499 */;
|
|
import PermissionStore from "PermissionStore" /* 4276 */;
|
|
|
|
const Permissions = fn(1074).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;
|
|
};
|