K
Docs
API ReferencePiecesFind Channel
📡

Find Channel

base.channel.findBase SetChannels

Searches your server for text channels by name — or grabs however many the bot has permission to write to. Set limit to 1 for a single channel, or higher to get a list. Results become a ✨ Spark for use in Send Message.

When to use this
  • Set 'How many' to 1 (default) to get a single channel spark with {{channel.id}}
  • Set it higher to get a list — use with a Loop piece to post to each one
  • Leave 'Channel name' blank to grab the first available channel(s)

On the canvas

This is what Find Channel looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

📡
Find Channel
base.channel.find
Channels
name
general (leave blank for any channel)
limit
1
asrequired
channel (becomes a Spark!)
found
empty

Config fields

FieldTypeReqWhat it does
name
general (leave blank for any channel)
textChannel name 📍
limit
1
numberHow many to find 🔢
as
channel (becomes a Spark!)
textyesSave result as ✨

Sparks this piece adds

After this piece runs, these values are available as sparks in every node downstream.

{{channel}}arrayChannel(s) found (list when multiple matches)
{{channel.length}}numberNumber of items in channel
{{channel.0}}stringFirst matching channel
{{channel.id}}stringChannel's Discord ID

Output ports

foundChannel(s) found — available as a Spark
emptyNo matching channels found, or bot has no permission
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const matches = guild.channels.cache
  .filter((c) => c.isTextBased() && c.name.includes("announce"))
  .first(limit);
// {{channel.id}} or list {{channels}}