getChannel

async getChannel(channelId: string) → Promise<AnyGuildChannel | null>

Gets a channel in this guild from the gateway cache. The cached channel has its name, type, category (parentId), nsfw flag and permission overwrites, but not its topic, position or slowmode. Falls back to Discord when the channel isn’t cached. Returns null for channels outside this guild.

Parameters:
  • channelId: The channel ID.