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

64 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 11224
// Function ID: 11225
2026-07-20 16:05:17 +00:00
// Name: retrySendMessage
2026-08-25 06:04:03 +00:00
// Dependencies: [4373, 7063, 10145, 4953, 8514, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 11224 (retrySendMessage)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
2026-08-25 06:04:03 +00:00
import MESSAGE_GROUP_SPACING from "MESSAGE_GROUP_SPACING" /* 4373 */;
import trackInviteDefault from "trackInvite" /* 7063 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const MessageSendLocation = MESSAGE_GROUP_SPACING.MessageSendLocation;
let result = set.fileFinishedImporting("modules/messages/retrySendMessage.native.tsx");
2026-07-20 16:05:17 +00:00
export default function retrySendMessage(id, id2, arr) {
2026-07-23 10:11:24 +00:00
const _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 = {};
}
2026-08-24 06:08:38 +00:00
trackInviteDefault.deleteMessage(id.id, id2.id, true);
2026-07-20 16:05:17 +00:00
if (id2.isCommandType()) {
if (tmp17) {
2026-08-25 06:04:03 +00:00
_require(10145).retryCommandMessage(id2, id, obj);
const obj6 = _require(10145);
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) {
2026-07-29 08:29:29 +00:00
const CloudUpload = guildId(table[3]).CloudUpload;
2026-07-20 16:05:17 +00:00
fromJsonResult = CloudUpload.fromJson(on);
}
return fromJsonResult;
});
}
2026-08-24 06:08:38 +00:00
const tmpResult = trackInviteDefault;
2026-07-20 16:05:17 +00:00
id = id.id;
2026-07-29 08:29:29 +00:00
obj = { content: null, tts: null, invalidEmojis: null, validNonShortcutEmojis: null };
obj[0] = content;
obj[1] = tts;
obj[2] = [];
obj[3] = [];
2026-07-20 16:05:17 +00:00
obj = {};
const merged = Object.assign(obj);
2026-07-29 08:29:29 +00:00
obj.nonce = nonce;
obj.flags = flags;
obj.messageReference = messageReference;
obj.location = MessageSendLocation.RETRY;
obj.attachmentsToUpload = mapped;
obj.onAttachmentUploadError = function onAttachmentUploadError(file, code, reason) {
2026-08-24 06:08:38 +00:00
let obj = guildId(closure_1_2[4]);
2026-07-23 10:11:24 +00:00
obj = { file, guildId: guildId.getGuildId(), analyticsLocations: [], code, reason };
2026-07-20 16:05:17 +00:00
const result = obj.handleUploadMessageAttachmentsErrors(obj);
};
2026-07-29 08:29:29 +00:00
tmpResult.sendMessage(id, obj, undefined, obj);
2026-07-20 16:05:17 +00:00
}
};