fix(handlers): add missing imports (#724)

* Update GUILD_EMOJIS_UPDATE.ts

* fix imports

Co-authored-by: ayntee <ayyantee@gmail.com>
This commit is contained in:
ITOH
2021-04-02 15:33:14 +02:00
committed by GitHub
parent 455cc6fb24
commit 99c252d2d5
12 changed files with 48 additions and 17 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import { cacheHandlers } from "../../cache.ts";
import { RequestManager } from "../../rest/request_manager.ts";
import { structures } from "../../structures/mod.ts";
import { DiscordChannel } from "../../types/mod.ts";
import { endpoints } from "../../util/constants.ts";
/** Returns a list of guild channel objects.
@@ -10,7 +11,7 @@ import { endpoints } from "../../util/constants.ts";
export async function getChannels(guildId: string, addToCache = true) {
const result = (await RequestManager.get(
endpoints.GUILD_CHANNELS(guildId),
) as ChannelCreatePayload[]);
) as DiscordChannel[]);
return Promise.all(result.map(async (res) => {
const channelStruct = await structures.createChannelStruct(res, guildId);