mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
ref
This commit is contained in:
@@ -15,11 +15,18 @@ export async function getChannels(guildId: string, addToCache = true) {
|
||||
) as DiscordChannel[]);
|
||||
|
||||
return Promise.all(result.map(async (res) => {
|
||||
const channelStruct = await structures.createChannelStruct(res, guildId);
|
||||
const discordenoChannel = await structures.createDiscordenoChannel(
|
||||
res,
|
||||
guildId,
|
||||
);
|
||||
if (addToCache) {
|
||||
await cacheHandlers.set("channels", channelStruct.id, channelStruct);
|
||||
await cacheHandlers.set(
|
||||
"channels",
|
||||
discordenoChannel.id,
|
||||
discordenoChannel,
|
||||
);
|
||||
}
|
||||
|
||||
return channelStruct;
|
||||
return discordenoChannel;
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user