decord/source/modules/interactions/InteractionActionCreators.tsx

75 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8376
// Function ID: 8377
2026-07-20 16:05:17 +00:00
// Name: _fetchMessageInteractionData
2026-07-29 08:29:29 +00:00
// Dependencies: [5, 676, 709, 530, 2]
2026-07-20 16:05:17 +00:00
// Exports: addQueued, fetchMessageInteractionData, queueInteractionComponentState, setFailed
2026-08-25 06:04:03 +00:00
// Module 8376 (_fetchMessageInteractionData)
2026-08-24 06:08:38 +00:00
import dispatcherDefault from "dispatcher" /* 709 */;
import closure_3 from "asyncGeneratorStep" /* 5 */;
import { Endpoints } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
function _fetchMessageInteractionData() {
const self = this;
const tmp = callback((arg0, arg1) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
closure_1 = arg1;
c4 = 0;
c5 = 0;
2026-08-14 17:33:39 +00:00
return (function*(arg0, body) {
2026-08-24 06:08:38 +00:00
closure_3 = tmp2;
2026-08-14 17:33:39 +00:00
body = tmp5;
2026-08-24 06:08:38 +00:00
const HTTP = callback(closure_1_2[3]).HTTP;
obj1 = { url: null, oldFormErrors: true, rejectWithError: null };
2026-08-04 21:03:28 +00:00
obj1[0] = c4.MESSAGE_INTERACTION_DATA(callback, callback2);
2026-08-24 06:08:38 +00:00
obj1[2] = callback(closure_1_2[3]).rejectWithMigratedError();
2026-08-14 17:33:39 +00:00
yield HTTP.get(obj1);
body = body.body;
const obj = callback2(body[2]);
const obj4 = { type: "LOAD_MESSAGE_INTERACTION_DATA_SUCCESS", channelId: null, messageId: null, interactionData: null };
obj4[1] = callback;
obj4[2] = callback2;
obj4[3] = body;
obj.dispatch(obj4);
return body;
2026-07-29 08:29:29 +00:00
})();
});
2026-08-24 06:08:38 +00:00
closure_5 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/interactions/InteractionActionCreators.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export const queueInteractionComponentState = function queueInteractionComponentState(c1, closure_9, c8, c4) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-29 08:29:29 +00:00
obj = { type: "QUEUE_INTERACTION_COMPONENT_STATE", messageId: c1, nonce: closure_9, state: c8, componentId: c4 };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
};
2026-07-29 08:29:29 +00:00
export const addQueued = function addQueued(closure_9, arg1) {
2026-07-20 16:05:17 +00:00
({ data, messageId, preflight, onCreate, onSuccess, onFailure } = arg1);
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-29 08:29:29 +00:00
obj = { type: "INTERACTION_QUEUE", data, nonce: closure_9, messageId, preflight, onCreate, onSuccess, onFailure };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
};
2026-07-29 08:29:29 +00:00
export const setFailed = function setFailed(closure_1, code, message, status) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-29 08:29:29 +00:00
obj = { type: "INTERACTION_FAILURE", nonce: closure_1, errorMessage: message, errorCode: code, status };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
};
export const fetchMessageInteractionData = function fetchMessageInteractionData(channelId, messageId) {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _fetchMessageInteractionData.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};