decord/beta/source/modules/polls/useVoteReactors.tsx
github-actions 9b6fea255e chore: update source for beta 346.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-18 19:45:33 +00:00

44 lines
1.4 KiB
TypeScript

// Module ID: 11856
// Function ID: 11857
// Name: useVoteReactors
// Dependencies: [7864, 1074, 504, 7865, 1330, 2]
// Exports: default
// Module 11856 (useVoteReactors)
import MessageReactionsTypes from "MessageReactionsTypes" /* 7865 */;
import MessageReactionsStore from "MessageReactionsStore" /* 7864 */;
require = fn;
let closure_4 = fn(1074).DEFAULT_NUM_REACTION_USERS;
const size = fn(2);
const result = size.fileFinishedImporting("modules/polls/useVoteReactors.tsx");
export default function useVoteReactors(channelId) {
channelId = channelId.channelId;
const messageId = channelId.messageId;
const reaction = channelId.reaction;
let items = [MessageReactionsStore];
const items1 = [channelId, messageId, reaction.emoji];
const stateFromStores = channelId(reaction[2]).useStateFromStores(items, () => {
const reactions = MessageReactionsStore.getReactions(channelId, messageId, reaction.emoji, closure_4, MessageReactionsTypes.ReactionTypes.VOTE);
let items;
if (reactions != null) {
items = reactions.values();
}
if (items == null) {
items = [];
}
return Array.from(items);
}, items1, messageId(reaction[4]));
const obj2 = { reactors: stateFromStores, hasMore: null };
const count_details = reaction.count_details;
let num;
if (count_details != null) {
num = count_details.vote;
}
if (num == null) {
num = 0;
}
obj2.hasMore = num > stateFromStores.length;
return obj2;
};