decord/source/modules/messages/retrySendMessage.native.tsx
2026-08-25 06:04:03 +00:00

63 lines
2.1 KiB
TypeScript

// Module ID: 11224
// Function ID: 11225
// Name: retrySendMessage
// Dependencies: [4373, 7063, 10145, 4953, 8514, 2]
// Exports: default
// Module 11224 (retrySendMessage)
import set from "set" /* 2 */;
import MESSAGE_GROUP_SPACING from "MESSAGE_GROUP_SPACING" /* 4373 */;
import trackInviteDefault from "trackInvite" /* 7063 */;
const MessageSendLocation = MESSAGE_GROUP_SPACING.MessageSendLocation;
let result = set.fileFinishedImporting("modules/messages/retrySendMessage.native.tsx");
export default function retrySendMessage(id, id2, arr) {
const _require = id;
let obj = arg3;
if (arg3 === undefined) {
obj = {};
}
trackInviteDefault.deleteMessage(id.id, id2.id, true);
if (id2.isCommandType()) {
if (tmp17) {
_require(10145).retryCommandMessage(id2, id, obj);
const obj6 = _require(10145);
}
tmp17 = null != id2.interactionData && null != obj.applicationId;
} else {
const messageReference = id2.messageReference;
let mapped;
({ content, tts, flags, nonce } = id2);
if (arr != null) {
mapped = arr.map((on) => {
let fromJsonResult = on;
if (null == on.on) {
const CloudUpload = guildId(table[3]).CloudUpload;
fromJsonResult = CloudUpload.fromJson(on);
}
return fromJsonResult;
});
}
const tmpResult = trackInviteDefault;
id = id.id;
obj = { content: null, tts: null, invalidEmojis: null, validNonShortcutEmojis: null };
obj[0] = content;
obj[1] = tts;
obj[2] = [];
obj[3] = [];
obj = {};
const merged = Object.assign(obj);
obj.nonce = nonce;
obj.flags = flags;
obj.messageReference = messageReference;
obj.location = MessageSendLocation.RETRY;
obj.attachmentsToUpload = mapped;
obj.onAttachmentUploadError = function onAttachmentUploadError(file, code, reason) {
let obj = guildId(closure_1_2[4]);
obj = { file, guildId: guildId.getGuildId(), analyticsLocations: [], code, reason };
const result = obj.handleUploadMessageAttachmentsErrors(obj);
};
tmpResult.sendMessage(id, obj, undefined, obj);
}
};