decord/alpha/source/actions/native/GuildActionCreators.tsx

49 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 18412
// Function ID: 18413
// Name: actions/GuildActionCreators
2026-10-09 10:00:15 +00:00
// Dependencies: [1085, 584, 1295, 2]
2026-07-20 16:05:17 +00:00
// Exports: batchChannelUpdate, batchRoleUpdate
2026-10-12 06:59:38 +00:00
// Module 18412 (actions/GuildActionCreators)
2026-10-03 08:58:59 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
import Constants from "Constants" /* 1085 */;
2026-10-09 10:00:15 +00:00
import HTTPUtils from "HTTPUtils" /* 1295 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
function batchChannelUpdate(guildId, body) {
if (body.length > 0) {
2026-07-29 08:29:29 +00:00
function onEnd() {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
return obj.dispatch({ type: "GUILD_SETTINGS_SUBMIT_SUCCESS" });
2026-07-29 08:29:29 +00:00
}
2026-10-03 08:58:59 +00:00
let obj = DispatcherDefault;
obj.dispatch({ type: "GUILD_SETTINGS_SUBMIT" });
const HTTP = HTTPUtils.HTTP;
const request = { url: Endpoints.GUILD_CHANNELS(guildId), body, oldFormErrors: true, rejectWithError: true };
2026-10-03 08:58:59 +00:00
const patch = HTTP.patch;
const patchResult = patch(request);
patchResult.then(onEnd, onEnd);
2026-07-20 16:05:17 +00:00
}
}
function batchRoleUpdate(arg0, body) {
if (body.length > 0) {
2026-07-29 08:29:29 +00:00
function onEnd() {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
return obj.dispatch({ type: "GUILD_SETTINGS_SUBMIT_SUCCESS" });
2026-07-29 08:29:29 +00:00
}
2026-10-03 08:58:59 +00:00
let obj = DispatcherDefault;
obj.dispatch({ type: "GUILD_SETTINGS_SUBMIT" });
const HTTP = HTTPUtils.HTTP;
const request = { url: Endpoints.GUILD_ROLES(arg0), body, oldFormErrors: true, rejectWithError: true };
2026-10-03 08:58:59 +00:00
const patch = HTTP.patch;
const patchResult = patch(request);
patchResult.then(onEnd, onEnd);
2026-07-20 16:05:17 +00:00
}
}
const Endpoints = Constants.Endpoints;
const result = size.fileFinishedImporting("actions/native/GuildActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default { batchChannelUpdate, batchRoleUpdate };
export { batchChannelUpdate };
export { batchRoleUpdate };