decord/source/actions/GuildSubscriptionsActionCreators.tsx

80 lines
3 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 5927
// Function ID: 5928
2026-07-29 08:29:29 +00:00
// Name: subscribeMembers
2026-08-08 06:10:11 +00:00
// Dependencies: [709, 5903, 2]
2026-07-29 08:29:29 +00:00
// Exports: subscribeChannel, subscribeChannelDimensions, subscribeGuild, subscribeMembers, subscribeToMemberUpdates, unsubscribeFromMemberUpdates, unsubscribeMembers
2026-07-20 16:05:17 +00:00
2026-08-08 06:10:11 +00:00
// Module 5927 (subscribeMembers)
2026-07-23 10:11:24 +00:00
let result = require("set").fileFinishedImporting("actions/GuildSubscriptionsActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const subscribeMembers = function subscribeMembers(guildId, userIds) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "GUILD_SUBSCRIPTIONS_MEMBERS_ADD", guildId, userIds };
obj.dispatch(obj);
};
export const unsubscribeMembers = function unsubscribeMembers(guildId, userIds) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "GUILD_SUBSCRIPTIONS_MEMBERS_REMOVE", guildId, userIds };
obj.dispatch(obj);
};
export const subscribeToMemberUpdates = function subscribeToMemberUpdates(guildId) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "GUILD_SUBSCRIPTIONS_ADD_MEMBER_UPDATES", guildId };
obj.dispatch(obj);
};
export const unsubscribeFromMemberUpdates = function unsubscribeFromMemberUpdates(guildId) {
2026-07-29 08:29:29 +00:00
let obj = importDefault(709);
2026-07-20 16:05:17 +00:00
obj = { type: "GUILD_SUBSCRIPTIONS_REMOVE_MEMBER_UPDATES", guildId };
obj.dispatch(obj);
};
2026-07-29 08:29:29 +00:00
export const subscribeGuild = function subscribeGuild(id) {
let obj = importDefault(709);
obj = { type: "GUILD_SUBSCRIPTIONS", guildId: id };
obj.dispatch(obj);
};
export const subscribeChannel = function subscribeChannel(guildId, channelId, ranges) {
let obj = importDefault(709);
obj = { type: "GUILD_SUBSCRIPTIONS_CHANNEL", guildId, channelId, ranges };
2026-07-20 16:05:17 +00:00
obj.dispatch(obj);
};
export const subscribeChannelDimensions = function subscribeChannelDimensions(arg0) {
let channelId;
let guildId;
let height;
2026-07-29 08:29:29 +00:00
let rowHeight;
2026-07-20 16:05:17 +00:00
let y;
2026-07-29 08:29:29 +00:00
({ y, height, rowHeight } = arg0);
2026-07-20 16:05:17 +00:00
({ guildId, channelId } = arg0);
2026-07-29 08:29:29 +00:00
const bound = Math.max(0, Math.ceil(Math.ceil(0.5 * height / rowHeight)));
const bound1 = Math.max(0, Math.ceil(Math.ceil(y / rowHeight)) + -bound);
let num = bound;
const sum = y + height;
if (bound === undefined) {
num = 0;
}
const items = [];
const bound2 = Math.max(0, Math.ceil(Math.ceil(sum / rowHeight)) + num);
let bound3 = bound1;
if (bound1 > 0) {
2026-07-20 16:05:17 +00:00
const _Math = Math;
2026-08-08 06:10:11 +00:00
const diff = require(5903) /* reset */.MINIMUM_RANGE - 1;
2026-07-29 08:29:29 +00:00
const items1 = [0, diff];
items.push(items1);
bound3 = Math.max(diff + 1, bound1);
2026-07-20 16:05:17 +00:00
}
2026-08-08 06:10:11 +00:00
const rounded = Math.floor(bound3 / require(5903) /* reset */.MINIMUM_RANGE);
let result = rounded * require(5903) /* reset */.MINIMUM_RANGE;
2026-07-29 08:29:29 +00:00
if (result <= bound2) {
2026-07-20 16:05:17 +00:00
do {
2026-07-29 08:29:29 +00:00
let tmp14 = require;
let tmp15 = dependencyMap;
2026-08-08 06:10:11 +00:00
let sum1 = result + (require(5903) /* reset */.MINIMUM_RANGE - 1);
2026-07-29 08:29:29 +00:00
let items2 = [result, sum1];
let arr = items.push(items2);
result = sum1 + 1;
let tmp11 = dependencyMap;
} while (result <= bound2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
importDefault(709).dispatch({ type: "GUILD_SUBSCRIPTIONS_CHANNEL", guildId, channelId, ranges: items });
2026-07-20 16:05:17 +00:00
};