520 lines
20 KiB
TypeScript
520 lines
20 KiB
TypeScript
// Metro module 15661 (f15662).
|
|
import { Permissions } from "../../_bundle/Module505";
|
|
import * as _index_native from "../../intl/index.native";
|
|
import { intl } from "../../intl/index.native";
|
|
import { isNotNullish } from "../../utils/GlobalUtils";
|
|
function $mk97385() {
|
|
return (a0) => !a0.isExperimental;
|
|
}
|
|
function $mk97386($env) {
|
|
return (a0) => $env[0][a0.toString()];
|
|
}
|
|
const getGuildPermissionSpec = function getGuildPermissionSpec(a0) {
|
|
const r3 = {};
|
|
r3[Permissions.VIEW_CHANNEL.toString()] = {
|
|
title: intl.string(_index_native.t.uV83yi),
|
|
description: _index_native.t.ybTHLk,
|
|
flag: Permissions.VIEW_CHANNEL
|
|
};
|
|
r3[Permissions.MANAGE_CHANNELS.toString()] = {
|
|
title: intl.string(_index_native.t["9qLtWs"]),
|
|
description: _index_native.t.qfJnug,
|
|
flag: Permissions.MANAGE_CHANNELS
|
|
};
|
|
r3[Permissions.MANAGE_ROLES.toString()] = {
|
|
title: intl.string(_index_native.t["C8d+oG"]),
|
|
description: _index_native.t.buo9uw,
|
|
flag: Permissions.MANAGE_ROLES
|
|
};
|
|
r3[Permissions.MANAGE_GUILD_EXPRESSIONS.toString()] = {
|
|
title: intl.string(_index_native.t.bbuXIn),
|
|
description: _index_native.t["4vb3/6"],
|
|
flag: Permissions.MANAGE_GUILD_EXPRESSIONS
|
|
};
|
|
r3[Permissions.CREATE_GUILD_EXPRESSIONS.toString()] = {
|
|
title: intl.string(_index_native.t.HarVuP),
|
|
description: _index_native.t.gkdHvH,
|
|
flag: Permissions.CREATE_GUILD_EXPRESSIONS
|
|
};
|
|
r3[Permissions.VIEW_AUDIT_LOG.toString()] = {
|
|
title: intl.string(_index_native.t.fZgLpA),
|
|
description: _index_native.t["0hx75i"],
|
|
flag: Permissions.VIEW_AUDIT_LOG
|
|
};
|
|
r3[Permissions.VIEW_GUILD_ANALYTICS.toString()] = {
|
|
title: intl.string(_index_native.t["rQJBE/"]),
|
|
description: _index_native.t.whVKhX,
|
|
flag: Permissions.VIEW_GUILD_ANALYTICS
|
|
};
|
|
r3[Permissions.VIEW_CREATOR_MONETIZATION_ANALYTICS.toString()] = {
|
|
title: intl.string(_index_native.t["0lTLTv"]),
|
|
description: _index_native.t.mut6NV,
|
|
flag: Permissions.VIEW_CREATOR_MONETIZATION_ANALYTICS
|
|
};
|
|
r3[Permissions.MANAGE_WEBHOOKS.toString()] = {
|
|
title: intl.string(_index_native.t["/ADKmM"]),
|
|
description: _index_native.t.LczYqC,
|
|
flag: Permissions.MANAGE_WEBHOOKS
|
|
};
|
|
r3[Permissions.MANAGE_GUILD.toString()] = {
|
|
title: intl.string(_index_native.t.QZRcfO),
|
|
description: _index_native.t["KoQe/G"],
|
|
flag: Permissions.MANAGE_GUILD
|
|
};
|
|
r3[Permissions.CREATE_INSTANT_INVITE.toString()] = {
|
|
title: intl.string(_index_native.t.zJrgTG),
|
|
description: _index_native.t.PCFOZa,
|
|
flag: Permissions.CREATE_INSTANT_INVITE
|
|
};
|
|
r3[Permissions.CHANGE_NICKNAME.toString()] = {
|
|
title: intl.string(_index_native.t.dilOF6),
|
|
description: _index_native.t["b8B++j"],
|
|
flag: Permissions.CHANGE_NICKNAME
|
|
};
|
|
r3[Permissions.MANAGE_NICKNAMES.toString()] = {
|
|
title: intl.string(_index_native.t["t+Ct5x"]),
|
|
description: _index_native.t.hTnlMb,
|
|
flag: Permissions.MANAGE_NICKNAMES
|
|
};
|
|
r3[Permissions.KICK_MEMBERS.toString()] = {
|
|
title: a0.showMembershipManualApprovalPermissions ? intl.string(_index_native.t["9TxXwb"]) : intl.string(_index_native.t.pBNv6i),
|
|
description: a0.showMembershipManualApprovalPermissions ? _index_native.t.hGBAnw : _index_native.t.rwdPaE,
|
|
flag: Permissions.KICK_MEMBERS
|
|
};
|
|
r3[Permissions.BAN_MEMBERS.toString()] = {
|
|
title: intl.string(_index_native.t.oTBA7N),
|
|
description: _index_native.t["OqNY0/"],
|
|
flag: Permissions.BAN_MEMBERS
|
|
};
|
|
r3[Permissions.MODERATE_MEMBERS.toString()] = {
|
|
title: intl.string(_index_native.t["+RL6pz"]),
|
|
description: _index_native.t.T6bZsX,
|
|
flag: Permissions.MODERATE_MEMBERS
|
|
};
|
|
r3[Permissions.SEND_MESSAGES.toString()] = {
|
|
title: intl.string(_index_native.t.S1VOwd),
|
|
description: _index_native.t.prvWKm,
|
|
flag: Permissions.SEND_MESSAGES
|
|
};
|
|
r3[Permissions.EMBED_LINKS.toString()] = {
|
|
title: intl.string(_index_native.t["969dEL"]),
|
|
description: _index_native.t.ChoIiy,
|
|
flag: Permissions.EMBED_LINKS
|
|
};
|
|
r3[Permissions.ATTACH_FILES.toString()] = {
|
|
title: intl.string(_index_native.t["3AS4UM"]),
|
|
description: _index_native.t["/87mYH"],
|
|
flag: Permissions.ATTACH_FILES
|
|
};
|
|
r3[Permissions.ADD_REACTIONS.toString()] = {
|
|
title: intl.string(_index_native.t.yEoJAr),
|
|
description: _index_native.t.FEYwX7,
|
|
flag: Permissions.ADD_REACTIONS
|
|
};
|
|
r3[Permissions.USE_EXTERNAL_EMOJIS.toString()] = {
|
|
title: intl.string(_index_native.t["+bxf3H"]),
|
|
description: _index_native.t.POeVIu,
|
|
flag: Permissions.USE_EXTERNAL_EMOJIS
|
|
};
|
|
r3[Permissions.USE_EXTERNAL_STICKERS.toString()] = {
|
|
title: intl.string(_index_native.t.ERNhYf),
|
|
description: _index_native.t.AdXVhI,
|
|
flag: Permissions.USE_EXTERNAL_STICKERS
|
|
};
|
|
r3[Permissions.MENTION_EVERYONE.toString()] = {
|
|
title: intl.string(_index_native.t.Y78KGC),
|
|
description: intl.string(_index_native.t.ryj6N5),
|
|
flag: Permissions.MENTION_EVERYONE
|
|
};
|
|
r3[Permissions.MANAGE_MESSAGES.toString()] = {
|
|
title: intl.string(_index_native.t["6lU9xM"]),
|
|
description: _index_native.t["RXMG/+"],
|
|
flag: Permissions.MANAGE_MESSAGES
|
|
};
|
|
r3[Permissions.PIN_MESSAGES.toString()] = {
|
|
title: intl.string(_index_native.t.Y5BI39),
|
|
description: _index_native.t["LN/K3x"],
|
|
flag: Permissions.PIN_MESSAGES
|
|
};
|
|
r3[Permissions.BYPASS_SLOWMODE.toString()] = {
|
|
title: intl.string(_index_native.t.kqcjeV),
|
|
description: _index_native.t.S2ZE5c,
|
|
flag: Permissions.BYPASS_SLOWMODE
|
|
};
|
|
r3[Permissions.MANAGE_OFFICIAL_MESSAGES.toString()] = {
|
|
title: intl.string(_index_native.t.Aj9ruN),
|
|
description: _index_native.t.pfEgBm,
|
|
flag: Permissions.MANAGE_OFFICIAL_MESSAGES
|
|
};
|
|
r3[Permissions.READ_MESSAGE_HISTORY.toString()] = {
|
|
title: intl.string(_index_native.t.l9ufaR),
|
|
description: _index_native.t.rmHPFR,
|
|
flag: Permissions.READ_MESSAGE_HISTORY
|
|
};
|
|
r3[Permissions.SEND_TTS_MESSAGES.toString()] = {
|
|
title: intl.string(_index_native.t.mMbwh7),
|
|
description: _index_native.t.D6x8Nr,
|
|
flag: Permissions.SEND_TTS_MESSAGES
|
|
};
|
|
r3[Permissions.USE_APPLICATION_COMMANDS.toString()] = {
|
|
title: intl.string(_index_native.t.nkoPOt),
|
|
description: _index_native.t.pJrJ35,
|
|
flag: Permissions.USE_APPLICATION_COMMANDS
|
|
};
|
|
r3[Permissions.USE_EXTERNAL_APPS.toString()] = {
|
|
title: intl.string(_index_native.t.TtA5rK),
|
|
description: _index_native.t.mzLoDY,
|
|
flag: Permissions.USE_EXTERNAL_APPS
|
|
};
|
|
r3[Permissions.SEND_VOICE_MESSAGES.toString()] = {
|
|
title: intl.string(_index_native.t.WlWSBT),
|
|
description: _index_native.t.pDuyi0,
|
|
flag: Permissions.SEND_VOICE_MESSAGES
|
|
};
|
|
r3[Permissions.SEND_POLLS.toString()] = {
|
|
title: intl.string(_index_native.t.UMQ7Ww),
|
|
description: _index_native.t["Xl6W+F"],
|
|
flag: Permissions.SEND_POLLS
|
|
};
|
|
r3[Permissions.CONNECT.toString()] = {
|
|
title: intl.string(_index_native.t.S0W8Z5),
|
|
description: _index_native.t["3GCm/f"],
|
|
flag: Permissions.CONNECT
|
|
};
|
|
r3[Permissions.SPEAK.toString()] = {
|
|
title: intl.string(_index_native.t["8w1tIR"]),
|
|
description: _index_native.t.y4MncF,
|
|
flag: Permissions.SPEAK
|
|
};
|
|
r3[Permissions.STREAM.toString()] = {
|
|
title: intl.string(_index_native.t.FlNoSV),
|
|
description: _index_native.t["6Z0j9v"],
|
|
flag: Permissions.STREAM
|
|
};
|
|
r3[Permissions.USE_EMBEDDED_ACTIVITIES.toString()] = {
|
|
title: intl.string(_index_native.t.rLSGeh),
|
|
description: _index_native.t.BEqU5H,
|
|
flag: Permissions.USE_EMBEDDED_ACTIVITIES
|
|
};
|
|
const r686 = Permissions.USE_SOUNDBOARD.toString();
|
|
const r696 = {
|
|
title: intl.string(_index_native.t.Bco7NG),
|
|
description: null,
|
|
flag: null
|
|
};
|
|
let description = a0?.SOUNDBOARD_DESCRIPTION;
|
|
if (description == null) {
|
|
description = _index_native.t["+8p+fc"];
|
|
}
|
|
r696.description = description;
|
|
r696.flag = Permissions.USE_SOUNDBOARD;
|
|
r3[r686] = r696;
|
|
r3[Permissions.USE_EXTERNAL_SOUNDS.toString()] = {
|
|
title: intl.string(_index_native.t.pwaVJ6),
|
|
description: _index_native.t.qDpPtX,
|
|
flag: Permissions.USE_EXTERNAL_SOUNDS
|
|
};
|
|
r3[Permissions.USE_VAD.toString()] = {
|
|
title: intl.string(_index_native.t["08zAV7"]),
|
|
description: _index_native.t["7CHjmc"],
|
|
flag: Permissions.USE_VAD
|
|
};
|
|
const r740 = Permissions.PRIORITY_SPEAKER.toString();
|
|
const r750 = {
|
|
title: intl.string(_index_native.t.BVK71i),
|
|
description: null,
|
|
flag: null
|
|
};
|
|
let description2 = a0?.PRIORITY_SPEAKER_DESCRIPTION;
|
|
if (description2 == null) {
|
|
description2 = _index_native.t.OJkrro;
|
|
}
|
|
r750.description = description2;
|
|
r750.flag = Permissions.PRIORITY_SPEAKER;
|
|
r3[r740] = r750;
|
|
r3[Permissions.MUTE_MEMBERS.toString()] = {
|
|
title: intl.string(_index_native.t["8EI30/"]),
|
|
description: _index_native.t.PIhGA1,
|
|
flag: Permissions.MUTE_MEMBERS
|
|
};
|
|
r3[Permissions.DEAFEN_MEMBERS.toString()] = {
|
|
title: intl.string(_index_native.t["9L47Fr"]),
|
|
description: _index_native.t["FQr3+t"],
|
|
flag: Permissions.DEAFEN_MEMBERS
|
|
};
|
|
r3[Permissions.MOVE_MEMBERS.toString()] = {
|
|
title: intl.string(_index_native.t.YtjJPQ),
|
|
description: _index_native.t.SEe0Gp,
|
|
flag: Permissions.MOVE_MEMBERS
|
|
};
|
|
r3[Permissions.REQUEST_TO_SPEAK.toString()] = {
|
|
title: intl.string(_index_native.t["5kicT2"]),
|
|
description: _index_native.t["yNE+Q5"],
|
|
flag: Permissions.REQUEST_TO_SPEAK,
|
|
isExperimental: true
|
|
};
|
|
r3[Permissions.ADMINISTRATOR.toString()] = {
|
|
title: intl.string(_index_native.t.PGvZqX),
|
|
description: typeof _index_native.t.UJxMrK === "string" ? _index_native.t.UJxMrK : intl.format(_index_native.t.UJxMrK, {}),
|
|
flag: Permissions.ADMINISTRATOR
|
|
};
|
|
r3[Permissions.MANAGE_EVENTS.toString()] = {
|
|
title: intl.string(_index_native.t.HIgA5a),
|
|
description: _index_native.t["SL+qgG"],
|
|
flag: Permissions.MANAGE_EVENTS
|
|
};
|
|
r3[Permissions.CREATE_EVENTS.toString()] = {
|
|
title: intl.string(_index_native.t.qyjZua),
|
|
description: _index_native.t.bQEFJZ,
|
|
flag: Permissions.CREATE_EVENTS
|
|
};
|
|
r3[Permissions.MANAGE_THREADS.toString()] = {
|
|
title: intl.string(_index_native.t.QKe7Q3),
|
|
description: _index_native.t.QAxIIt,
|
|
flag: Permissions.MANAGE_THREADS
|
|
};
|
|
r3[Permissions.CREATE_PUBLIC_THREADS.toString()] = {
|
|
title: intl.string(_index_native.t["25rKnX"]),
|
|
description: _index_native.t.ODCYj8,
|
|
flag: Permissions.CREATE_PUBLIC_THREADS
|
|
};
|
|
r3[Permissions.CREATE_PRIVATE_THREADS.toString()] = {
|
|
title: intl.string(_index_native.t.QwbTSa),
|
|
description: _index_native.t["G/cc3l"],
|
|
flag: Permissions.CREATE_PRIVATE_THREADS
|
|
};
|
|
r3[Permissions.SEND_MESSAGES_IN_THREADS.toString()] = {
|
|
title: intl.string(_index_native.t["5QlVGy"]),
|
|
description: _index_native.t.C2ZPE3,
|
|
flag: Permissions.SEND_MESSAGES_IN_THREADS
|
|
};
|
|
r3[Permissions.SET_VOICE_CHANNEL_STATUS.toString()] = {
|
|
title: intl.string(_index_native.t.VBwkUf),
|
|
description: a0.enableHangoutWindow ? _index_native.t.CYcJ6H : _index_native.t.C6BzXx,
|
|
flag: Permissions.SET_VOICE_CHANNEL_STATUS
|
|
};
|
|
return r3;
|
|
};
|
|
export { getGuildPermissionSpec };
|
|
export function generateGuildPermissionSpec(a0) {
|
|
const guildPermissionSpec = getGuildPermissionSpec(a0);
|
|
const r11 = [Permissions.VIEW_CHANNEL, Permissions.MANAGE_CHANNELS, Permissions.MANAGE_ROLES, Permissions.CREATE_GUILD_EXPRESSIONS, Permissions.MANAGE_GUILD_EXPRESSIONS, Permissions.VIEW_AUDIT_LOG, Permissions.VIEW_GUILD_ANALYTICS];
|
|
if (a0.showCreatorMonetizationAnalyticsPermission) {
|
|
r11.push(Permissions.VIEW_CREATOR_MONETIZATION_ANALYTICS);
|
|
}
|
|
let env22308;
|
|
let env22309;
|
|
r11.push(Permissions.MANAGE_WEBHOOKS);
|
|
r11.push(Permissions.MANAGE_GUILD);
|
|
const r37 = {
|
|
title: intl.string(_index_native.t["mYck+B"]),
|
|
permissions: null
|
|
};
|
|
const r38 = env22308 = {};
|
|
env22308[0] = guildPermissionSpec;
|
|
r37.permissions = r11.map($mk97386(r38));
|
|
r37.permissions = r37.permissions.filter($mk97385());
|
|
const r48 = [Permissions.CREATE_INSTANT_INVITE, Permissions.CHANGE_NICKNAME, Permissions.MANAGE_NICKNAMES, Permissions.KICK_MEMBERS, Permissions.BAN_MEMBERS, Permissions.MODERATE_MEMBERS];
|
|
const r62 = {
|
|
title: intl.string(_index_native.t.Ny49TN),
|
|
permissions: null
|
|
};
|
|
const r63 = env22309 = {};
|
|
env22309[0] = guildPermissionSpec;
|
|
r62.permissions = r48.map($mk97386(r63));
|
|
r62.permissions = r62.permissions.filter($mk97385());
|
|
const r46 = [r37, r62, , , ,];
|
|
const r72 = [Permissions.SEND_MESSAGES, Permissions.SEND_MESSAGES_IN_THREADS, Permissions.CREATE_PUBLIC_THREADS, Permissions.CREATE_PRIVATE_THREADS, Permissions.EMBED_LINKS, Permissions.ATTACH_FILES, Permissions.ADD_REACTIONS, Permissions.USE_EXTERNAL_EMOJIS, Permissions.USE_EXTERNAL_STICKERS, Permissions.USE_EXTERNAL_SOUNDS, Permissions.MENTION_EVERYONE, Permissions.MANAGE_MESSAGES, Permissions.PIN_MESSAGES, Permissions.MANAGE_OFFICIAL_MESSAGES, Permissions.BYPASS_SLOWMODE, Permissions.MANAGE_THREADS, Permissions.READ_MESSAGE_HISTORY, Permissions.SEND_TTS_MESSAGES, Permissions.SEND_VOICE_MESSAGES, Permissions.SEND_POLLS];
|
|
const r93 = a0.inSoundmojiExperiment ? r72 : r72.filter((item) => item !== Permissions.USE_EXTERNAL_SOUNDS);
|
|
let env22310;
|
|
let env22311;
|
|
let env22312;
|
|
const r105 = {
|
|
title: intl.string(_index_native.t.cKobO5),
|
|
permissions: null
|
|
};
|
|
const r106 = env22310 = {};
|
|
env22310[0] = guildPermissionSpec;
|
|
r105.permissions = r93.map($mk97386(r106));
|
|
r105.permissions = r105.permissions.filter($mk97385());
|
|
r46[2] = r105;
|
|
const r115 = [Permissions.CONNECT, Permissions.SPEAK, Permissions.STREAM, Permissions.USE_SOUNDBOARD, Permissions.USE_EXTERNAL_SOUNDS, Permissions.USE_VAD, Permissions.PRIORITY_SPEAKER, Permissions.MUTE_MEMBERS, Permissions.DEAFEN_MEMBERS, Permissions.MOVE_MEMBERS, Permissions.SET_VOICE_CHANNEL_STATUS];
|
|
const r135 = {
|
|
title: intl.string(_index_native.t["46Ra1b"]),
|
|
permissions: null
|
|
};
|
|
const r136 = env22311 = {};
|
|
env22311[0] = guildPermissionSpec;
|
|
r135.permissions = r115.map($mk97386(r136));
|
|
r135.permissions = r135.permissions.filter($mk97385());
|
|
r46[3] = r135;
|
|
const r145 = [Permissions.USE_APPLICATION_COMMANDS, Permissions.USE_EMBEDDED_ACTIVITIES, Permissions.USE_EXTERNAL_APPS];
|
|
const r157 = {
|
|
title: intl.string(_index_native.t["rrh/W6"]),
|
|
permissions: null
|
|
};
|
|
const r158 = env22312 = {};
|
|
env22312[0] = guildPermissionSpec;
|
|
r157.permissions = r145.map($mk97386(r158));
|
|
r157.permissions = r157.permissions.filter($mk97385());
|
|
r46[4] = r157;
|
|
if (a0.showStageChannelPermissions) {
|
|
let env22313;
|
|
const r177 = {
|
|
title: intl.string(_index_native.t.yniauk),
|
|
permissions: null
|
|
};
|
|
const r179 = [Permissions.REQUEST_TO_SPEAK];
|
|
const r180 = env22313 = {};
|
|
env22313[0] = guildPermissionSpec;
|
|
r177.permissions = r179.map($mk97386(r180));
|
|
let showExperimental = a0.showExperimental;
|
|
if (showExperimental === void 0) {
|
|
showExperimental = false;
|
|
}
|
|
if (!showExperimental) {
|
|
r177.permissions = r177.permissions.filter($mk97385());
|
|
}
|
|
r46.push(r177);
|
|
}
|
|
let env22314;
|
|
const r200 = {
|
|
title: intl.string(_index_native.t.b8lplT),
|
|
permissions: null
|
|
};
|
|
const r202 = [Permissions.CREATE_EVENTS, Permissions.MANAGE_EVENTS];
|
|
const r204 = env22314 = {};
|
|
env22314[0] = guildPermissionSpec;
|
|
r200.permissions = r202.map($mk97386(r204));
|
|
let showExperimental2 = a0.showExperimental;
|
|
if (showExperimental2 === void 0) {
|
|
showExperimental2 = false;
|
|
}
|
|
if (!showExperimental2) {
|
|
r200.permissions = r200.permissions.filter($mk97385());
|
|
}
|
|
let env22315;
|
|
r46.push(r200);
|
|
const r224 = {
|
|
title: intl.string(_index_native.t["3uI5CX"]),
|
|
permissions: null
|
|
};
|
|
const r226 = [Permissions.ADMINISTRATOR];
|
|
const r227 = env22315 = {};
|
|
env22315[0] = guildPermissionSpec;
|
|
r224.permissions = r226.map($mk97386(r227));
|
|
r224.permissions = r224.permissions.filter($mk97385());
|
|
r46.push(r224);
|
|
return r46;
|
|
}
|
|
export function generateChannelGeneralSection(a0, a1, r3 = {
|
|
showManageWebhooks: true
|
|
}) {
|
|
const showManageWebhooks = r3?.showManageWebhooks;
|
|
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
|
|
const r11 = showManageWebhooks ? [VIEW_CHANNEL, Permissions.MANAGE_CHANNELS, Permissions.MANAGE_ROLES, Permissions.MANAGE_WEBHOOKS] : [VIEW_CHANNEL, Permissions.MANAGE_CHANNELS, Permissions.MANAGE_ROLES];
|
|
let env22316;
|
|
const r18 = env22316 = {};
|
|
env22316[0] = a0;
|
|
return {
|
|
title: a1,
|
|
permissions: r11.map($mk97386(r18))
|
|
};
|
|
}
|
|
export function generateChannelMembershipSection(a0, a1) {
|
|
let env22317;
|
|
const r3 = [Permissions.CREATE_INSTANT_INVITE];
|
|
const r7 = env22317 = {};
|
|
env22317[0] = a0;
|
|
return {
|
|
title: a1,
|
|
permissions: r3.map($mk97386(r7))
|
|
};
|
|
}
|
|
export function generateChannelTextSection(a0, a1, a2) {
|
|
const r4 = [Permissions.SEND_MESSAGES, Permissions.SEND_MESSAGES_IN_THREADS, Permissions.CREATE_PUBLIC_THREADS, Permissions.CREATE_PRIVATE_THREADS, Permissions.EMBED_LINKS, Permissions.ATTACH_FILES, Permissions.ADD_REACTIONS, Permissions.USE_EXTERNAL_EMOJIS, Permissions.USE_EXTERNAL_STICKERS, Permissions.USE_EXTERNAL_SOUNDS, Permissions.MENTION_EVERYONE, Permissions.MANAGE_MESSAGES, Permissions.PIN_MESSAGES, Permissions.MANAGE_OFFICIAL_MESSAGES, Permissions.BYPASS_SLOWMODE, Permissions.MANAGE_THREADS, Permissions.READ_MESSAGE_HISTORY, Permissions.SEND_TTS_MESSAGES, Permissions.SEND_VOICE_MESSAGES, Permissions.SEND_POLLS];
|
|
const r5 = a2.inSoundmojiExperiment ? r4 : r4.filter((item) => item !== Permissions.USE_EXTERNAL_SOUNDS);
|
|
const r29 = a2.showPrivateThreads && a2.showCreateThreads ? r5 : r5.filter((item) => item !== Permissions.CREATE_PRIVATE_THREADS);
|
|
const r33 = a2.showCreateThreads ? r29 : r29.filter((item) => item !== Permissions.CREATE_PUBLIC_THREADS);
|
|
let env22318;
|
|
const r40 = env22318 = {};
|
|
env22318[0] = a0;
|
|
return {
|
|
title: a1,
|
|
description: a2.sectionDescription,
|
|
permissions: r33.map($mk97386(r40))
|
|
};
|
|
}
|
|
export function generateChannelVoiceSection(a0, a1) {
|
|
let env22319;
|
|
const r3 = [Permissions.CONNECT, Permissions.SPEAK, Permissions.STREAM, Permissions.USE_SOUNDBOARD, Permissions.USE_EXTERNAL_SOUNDS, Permissions.USE_VAD, Permissions.PRIORITY_SPEAKER, Permissions.MUTE_MEMBERS, Permissions.DEAFEN_MEMBERS, Permissions.MOVE_MEMBERS, Permissions.SET_VOICE_CHANNEL_STATUS];
|
|
const r16 = env22319 = {};
|
|
env22319[0] = a0;
|
|
return {
|
|
title: a1,
|
|
permissions: r3.map($mk97386(r16))
|
|
};
|
|
}
|
|
export function generateChannelVoiceChatSection(a0, a1, a2) {
|
|
const r4 = [Permissions.SEND_MESSAGES, Permissions.EMBED_LINKS, Permissions.ATTACH_FILES, Permissions.ADD_REACTIONS, Permissions.USE_EXTERNAL_EMOJIS, Permissions.USE_EXTERNAL_STICKERS, Permissions.USE_EXTERNAL_SOUNDS, Permissions.MENTION_EVERYONE, Permissions.MANAGE_MESSAGES, Permissions.BYPASS_SLOWMODE, Permissions.READ_MESSAGE_HISTORY, Permissions.SEND_TTS_MESSAGES, Permissions.SEND_VOICE_MESSAGES, Permissions.SEND_POLLS];
|
|
const r19 = a2.inSoundmojiExperiment ? r4 : r4.filter((item) => item !== Permissions.USE_EXTERNAL_SOUNDS);
|
|
let env22320;
|
|
const r26 = env22320 = {};
|
|
env22320[0] = a0;
|
|
return {
|
|
title: a1,
|
|
description: a2.sectionDescription,
|
|
permissions: r19.map($mk97386(r26))
|
|
};
|
|
}
|
|
export function generateChannelAppsSection(a0, a1, r3 = {
|
|
showActivities: true
|
|
}) {
|
|
const r5 = [Permissions.USE_APPLICATION_COMMANDS, , ,];
|
|
const r9 = r3.showActivities ? Permissions.USE_EMBEDDED_ACTIVITIES : null;
|
|
let env22321;
|
|
r5[1] = r9;
|
|
r5[2] = Permissions.USE_EXTERNAL_APPS;
|
|
const r18 = r5.filter(isNotNullish);
|
|
const r19 = env22321 = {};
|
|
env22321[0] = a0;
|
|
return {
|
|
title: a1,
|
|
permissions: r18.map($mk97386(r19))
|
|
};
|
|
}
|
|
export function generateChannelStageVoiceSection(a0, a1, a2) {
|
|
const CONNECT = Permissions.CONNECT;
|
|
const r3 = a2 ? [CONNECT, Permissions.STREAM, Permissions.MUTE_MEMBERS, Permissions.MOVE_MEMBERS] : [CONNECT, Permissions.MUTE_MEMBERS, Permissions.MOVE_MEMBERS];
|
|
let env22322;
|
|
const r14 = env22322 = {};
|
|
env22322[0] = a0;
|
|
return {
|
|
title: a1,
|
|
permissions: r3.map($mk97386(r14))
|
|
};
|
|
}
|
|
export function generateChannelStageSection(a0, a1) {
|
|
let env22323;
|
|
const r3 = [Permissions.REQUEST_TO_SPEAK, Permissions.MENTION_EVERYONE];
|
|
const r7 = env22323 = {};
|
|
env22323[0] = a0;
|
|
return {
|
|
title: a1,
|
|
permissions: r3.map($mk97386(r7))
|
|
};
|
|
}
|
|
export function generateChannelEventsSection(a0, a1) {
|
|
let env22324;
|
|
const r3 = [Permissions.CREATE_EVENTS, Permissions.MANAGE_EVENTS];
|
|
const r7 = env22324 = {};
|
|
env22324[0] = a0;
|
|
return {
|
|
title: a1,
|
|
permissions: r3.map($mk97386(r7))
|
|
};
|
|
}
|
|
export function renderDescription(a0) {
|
|
return a0 != null ? typeof a0 === "string" ? a0.trim() : typeof a0 === "function" ? intl.format(a0, {}) : a0 : a0;
|
|
}
|