Efficient and simple module to locate Discord channels via name, or channel ID.
import { locateChan } from 'discord-channel-locator'
const generalChan = await locateChan(Client, {
lookup: 'general',
})
npm i discord-channel-locator
The name or the channel ID to locate
The ID of the guild to search for the channels in. This is optional. If not provided, the module will search for channels in all guilds the bot has access to.
An error is thrown when the channel is not found, so be sure to catch it.