decord/source/modules/instant_invite/canViewInviteModal.tsx

34 lines
971 B
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 8802
// Function ID: 8803
2026-07-20 16:05:17 +00:00
// Name: canViewInviteModal
2026-07-29 08:29:29 +00:00
// Dependencies: [676, 2]
2026-07-20 16:05:17 +00:00
// Exports: canViewInviteModal
2026-08-15 05:55:55 +00:00
// Module 8802 (canViewInviteModal)
2026-07-23 10:11:24 +00:00
import { Permissions } from "ME";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const result = require("set").fileFinishedImporting("modules/instant_invite/canViewInviteModal.tsx");
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;
};