decord/source/modules/messages/retrySendMessage.native.tsx

62 lines
2.2 KiB
TypeScript
Raw Normal View History

// Module ID: 11707
// Function ID: 11708
2026-07-20 16:05:17 +00:00
// Name: retrySendMessage
// Dependencies: [4567, 7470, 9443, 5141, 9341, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 11707 (retrySendMessage)
import MessageConstants from "MessageConstants" /* 4567 */;
import MessageActionCreatorsDefault from "MessageActionCreators" /* 7470 */;
import handleUploadAttachmentErrors from "handleUploadAttachmentErrors" /* 9341 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
const MessageSendLocation = MessageConstants.MessageSendLocation;
let result = size.fileFinishedImporting("modules/messages/retrySendMessage.native.tsx");
2026-07-20 16:05:17 +00:00
export default function retrySendMessage(id, id2, arr) {
_require = id;
2026-07-29 08:29:29 +00:00
let obj = arg3;
2026-07-20 16:05:17 +00:00
if (arg3 === undefined) {
obj = {};
}
MessageActionCreatorsDefault.deleteMessage(id.id, id2.id, true);
2026-07-20 16:05:17 +00:00
if (id2.isCommandType()) {
if (tmp17) {
require("executeCommand").retryCommandMessage(id2, id, obj);
const obj6 = require("executeCommand");
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
tmp17 = null != id2.interactionData && null != obj.applicationId;
2026-07-20 16:05:17 +00:00
} else {
const messageReference = id2.messageReference;
let mapped;
({ content, tts, flags, nonce } = id2);
2026-07-29 08:29:29 +00:00
if (arr != null) {
2026-07-20 16:05:17 +00:00
mapped = arr.map((on) => {
let fromJsonResult = on;
if (null == on.on) {
const CloudUpload = guildId(dependencyMap[3]).CloudUpload;
2026-07-20 16:05:17 +00:00
fromJsonResult = CloudUpload.fromJson(on);
}
return fromJsonResult;
});
}
const tmpResult = MessageActionCreatorsDefault;
2026-07-20 16:05:17 +00:00
id = id.id;
const obj3 = { content, tts, invalidEmojis: [], validNonShortcutEmojis: [] };
const obj4 = {};
2026-07-20 16:05:17 +00:00
const merged = Object.assign(obj);
obj4.nonce = nonce;
obj4.flags = flags;
obj4.messageReference = messageReference;
obj4.location = MessageSendLocation.RETRY;
obj4.attachmentsToUpload = mapped;
obj4.onAttachmentUploadError = function onAttachmentUploadError(file, code, reason) {
const obj = handleUploadAttachmentErrors;
const result = obj.handleUploadMessageAttachmentsErrors({ file, guildId: guildId.getGuildId(), analyticsLocations: [], code, reason });
2026-07-20 16:05:17 +00:00
};
tmpResult.sendMessage(id, obj3, undefined, obj4);
2026-07-20 16:05:17 +00:00
}
};