diff --git a/packages/core/src/structures/guilds.ts b/packages/core/src/structures/guilds.ts index 8b7fcb3..3c7a689 100644 --- a/packages/core/src/structures/guilds.ts +++ b/packages/core/src/structures/guilds.ts @@ -16,6 +16,7 @@ import { DiscordOverwrite, DiscordRole, DiscordVoiceRegion, + DiscordChannel, ExplicitContentFilterLevels, GuildNsfwLevel, MakeRequired, @@ -52,8 +53,9 @@ import { GUILD_VANITY, GUILD_WIDGET, USER_GUILDS, + CHANNEL, } from '@biscuitland/api-types'; -import { GuildChannel, ReturnThreadsArchive, ThreadChannel } from './channels'; +import { ChannelFactory, GuildChannel, ReturnThreadsArchive, ThreadChannel, Channel } from './channels'; import { Member, ThreadMember } from './members'; import { Role } from './role'; import { GuildEmoji } from './emojis'; @@ -1210,4 +1212,10 @@ export class Guild extends BaseGuild implements Model { return new GuildPreview(this.session, preview); } + + async fetchChannel(channelID: string): Promise { + const channel = await this.session.rest.get(CHANNEL(channelID)); + + return ChannelFactory.from(this.session, channel); + } }