CT3A tRPC make List of dynamic fetches

I have a list of discord guild id's, how should I go about dynamically requesting the guild's information from discord? (Not asking for discord-specific implementation. My question would be the same if you wanted to, for example, convert a user-id to username using db
2 Replies
Hycord | @ When Replying
let appeals = userAppealData?.map(async (ch: any) => {
return ch.id == 'null' ? ch : {
label: <span><FontAwesomeIcon
icon={faHome}
/>{/* {guildData.name} This is where issues come up. Have to make a request to get the guildData.name */}</span>,
id: ch.guildId,
active: ch.guildId == selectedServer,

}
})
let appeals = userAppealData?.map(async (ch: any) => {
return ch.id == 'null' ? ch : {
label: <span><FontAwesomeIcon
icon={faHome}
/>{/* {guildData.name} This is where issues come up. Have to make a request to get the guildData.name */}</span>,
id: ch.guildId,
active: ch.guildId == selectedServer,

}
})
andersgee
andersgee2y ago
Promise.all is probably what you are looking ofr
Want results from more Discord servers?
Add your server