diff --git a/src/managers/channels.ts b/src/managers/channels.ts index 7339434..4953020 100644 --- a/src/managers/channels.ts +++ b/src/managers/channels.ts @@ -43,7 +43,7 @@ export class ChannelsManager extends BaseManager { return result } - async fetch (id: string): Promise { + async fetch (id: string): Promise { return await new Promise((resolve, reject) => { this.client.rest .get(CHANNEL(id)) @@ -53,7 +53,7 @@ export class ChannelsManager extends BaseManager { if (data.guild_id !== undefined) { guild = await this.client.guilds.get(data.guild_id) } - resolve(getChannelByType(this.client, data as ChannelPayload, guild)) + resolve((getChannelByType(this.client, data as ChannelPayload, guild) as unknown) as T) }) .catch(e => reject(e)) })