discord-channel-locator
v1.0.1
Published
Locate Discord Channels via name or ID
Downloads
7
Maintainers
Readme
Discord Channel Locator 🔎
Efficient and simple module to locate Discord channels via name, or channel ID.
Example 💡
import { locateChan } from 'discord-channel-locator'
const generalChan = await locateChan(Client, {
lookup: 'general',
})
Installation ℹ️
npm i discord-channel-locator
Usage 📝
locateChan(client, options)
client
- Your Discord.js Client
Options <Object>
lookup
<String>
The name or the channel ID to locate
guildId
<String || null>
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.
Notes
An error is thrown when the channel is not found, so be sure to catch it.