decord/source/modules/instant_invite/canViewInviteModal.tsx

36 lines
1 KiB
TypeScript
Raw Normal View History

// Module ID: 9779
// Function ID: 9780
2026-07-20 16:05:17 +00:00
// Name: canViewInviteModal
// Dependencies: [1074, 2]
2026-07-20 16:05:17 +00:00
// Exports: canViewInviteModal
// Module 9779 (canViewInviteModal)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import ME from "ME" /* 1074 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
const Permissions = ME.Permissions;
const result = set.fileFinishedImporting("modules/instant_invite/canViewInviteModal.tsx");
2026-07-23 10:11:24 +00:00
export const canViewInviteModal = function canViewInviteModal(closure_6, guild, closure_0, stageInstanceByChannel) {
2026-07-29 08:29:29 +00:00
let tmp = closure_0;
if (closure_0 == null) {
tmp = guild;
2026-07-20 16:05:17 +00:00
}
let canResult = null != tmp;
if (canResult) {
canResult = closure_6.can(Permissions.CREATE_INSTANT_INVITE, tmp);
}
if (!canResult) {
canResult = null != guild && null != guild.vanityURLCode;
2026-07-29 08:29:29 +00:00
const tmp5 = null != guild && null != guild.vanityURLCode;
2026-07-20 16:05:17 +00:00
}
if (!canResult) {
let invite_code;
2026-07-29 08:29:29 +00:00
if (stageInstanceByChannel != null) {
2026-07-20 16:05:17 +00:00
invite_code = stageInstanceByChannel.invite_code;
}
canResult = null != invite_code;
}
return canResult;
};