This commit is contained in:
ITOH
2021-04-09 23:07:20 +02:00
parent b40aaf5a8f
commit 7a6b4bf2d7
41 changed files with 233 additions and 190 deletions
+7 -3
View File
@@ -14,13 +14,17 @@ export async function getChannel(channelId: string, addToCache = true) {
endpoints.CHANNEL_BASE(channelId),
)) as DiscordChannel;
const channelStruct = await structures.createChannelStruct(
const discordenoChannel = await structures.createDiscordenoChannel(
result,
result.guild_id,
);
if (addToCache) {
await cacheHandlers.set("channels", channelStruct.id, channelStruct);
await cacheHandlers.set(
"channels",
discordenoChannel.id,
discordenoChannel,
);
}
return channelStruct;
return discordenoChannel;
}