1.0.1 â€ĸ Published 12 months ago

discord-channel-locator v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Discord Channel Locator 🔎

Efficient and simple module to locate Discord channels via name, or channel ID.

install size

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.