Files
2026-07-28 01:06:53 +03:00

114 lines
5.9 KiB
TypeScript

/* Metro module 7873; source: modules/application_commands/native/ApplicationCommandBuiltIns.tsx; dependencies: [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ServerModule from '../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ApplicationCommandConstantsModule from '../ApplicationCommandConstants.tsx'; /* Metro dependency 5066 */
import * as ApplicationCommandTypesModule from '../ApplicationCommandTypes.tsx'; /* Metro dependency 5068 */
function _fun63116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:6, offset: 0x01b70e18, size: 284 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const BuiltInSectionId = (ApplicationCommandConstantsModule).BuiltInSectionId;
object = {'id': '-15', 'untranslatedName': 'leave', 'displayName': 'leave'};
const ApplicationCommandType = (ServerModule).ApplicationCommandType;
const CHAT = ApplicationCommandType.CHAT;
object.type = CHAT;
const ApplicationCommandInputType = (ApplicationCommandTypesModule).ApplicationCommandInputType;
let BUILT_IN = ApplicationCommandInputType.BUILT_IN;
object.inputType = BUILT_IN;
BUILT_IN = BuiltInSectionId.BUILT_IN;
object.applicationId = BUILT_IN;
Object.defineProperty(object, 'untranslatedDescription', {get: function() {
return require(dependencyMap[5]).intl.string(require(dependencyMap[5]).t['26C4oi']);
}, set: undefined, enumerable: true, configurable: true});
Object.defineProperty(object, 'displayDescription', {get: function() {
return require(dependencyMap[5]).intl.string(require(dependencyMap[5]).t['26C4oi']);
}, set: undefined, enumerable: true, configurable: true});
object.predicate = function({channel}) {
return channel != null && channel.isGroupDM();
};
object.execute = execute_63120;
const items2 = [object];
(FileImportTrackerModule).fileFinishedImporting('modules/application_commands/native/ApplicationCommandBuiltIns.tsx');
exports.default = items2;
function execute_63120(a0, {channel}) { // fn#63120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:533, offset: 0x01b70f8f, size: 457 bytes, params: 3, frame: 24
var r6;
var r7;
var moduleValue;
var channelName;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var object;
var value2;
var format;
var SSIVOu;
var value4;
var defaultImport;
var show;
if (channel != null) {
moduleValue = require(4805) /* metro dependency 4805: useChannelName */;
channelName = moduleValue.computeChannelName(channel, UserStore, RelationshipStore);
value2 = intl.formatToPlainString(t.hJ5Ap4, {name: channelName});
format = intl.format;
SSIVOu = t.SSIVOu;
object = {name: channelName};
if (channel.isManaged()) {
value4 = intl.formatToPlainString(t.hVGjEW, {name: channelName});
r6 = intl.format(t.IK1Qvs, {name: channelName});
r7 = value4;
} else {
r6 = Reflect.apply(format, intl, [SSIVOu, object]);
r7 = value2;
}
defaultImport = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport.show;
object = {title: r7, body: r6};
object.confirmText = intl.string(t['26C4oi']);
object.cancelText = intl.string(t['ETE/oC']);
object.onConfirm = onConfirm_63121;
Reflect.apply(show, defaultImport, [object]);
}
function execute_63120OnConfirm() { // fn#63121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8051:986, owner: execute_63120.onConfirm, offset: 0x01b71158, size: 158 bytes, params: 1, frame: 18
var value;
var property;
var defaultImport;
var closePrivateChannel;
var value2;
var id;
var error;
var defaultImport2;
var sendBotMessage;
var value3;
var intl;
var string;
var t;
try {
value = environment.__proto__;
property = dependencyMap[8];
defaultImport = importDefault(property);
closePrivateChannel = defaultImport.closePrivateChannel;
value2 = environment;
id = channel.id;
Reflect.apply(closePrivateChannel, defaultImport, [id]);
} catch (error) {
defaultImport2 = importDefault(dependencyMap[9]);
sendBotMessage = defaultImport2.sendBotMessage;
value3 = environment;
id = channel.id;
intl = require(dependencyMap[5]).intl;
string = intl.string;
t = require(dependencyMap[5]).t;
Reflect.apply(sendBotMessage, defaultImport2, [id, Reflect.apply(string, intl, [t['YOsuT/']])]);
}
}
}
}
global.__d(_fun63116, 7873, [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067,
2]) /* metro module 7873, dependencies: [3793, 1878, 5066, 1909, 5068, 1244, 4805, 4647, 4603, 7067, 2] */;