fetchChannel

async fetchChannel(channelId: string) Promise<AnyChannel | null>

Fetches any channel from Discord by ID. Use a typed channel getter when you intend to call channel-specific methods. Returns null when the channel cannot be found or fetched.

Parameters:
  • channelId — – The channel ID to fetch.