How do I make newly created channels automatically show up for everyone with onboarding enabled?

My bot makes new channels to meet voice channel demand, how do I make the new channels appear for everyone in the server, without being hidden under a "show all channels" button? I am okay with using the discord API directly.
4 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
jackssrt
jackssrtOP2y ago
node version: v19.3.0 pnpm ls discord.js: discord.js 14.9.0 code:
import type { CategoryChannel } from "discord.js";

async function createChannel(category: CategoryChannel) {
await category.children.create({
type: ChannelType.GuildVoice,
name: `🔊・general${getSuperscriptNumber(category.children.cache.size + 1)}`,
});
}
import type { CategoryChannel } from "discord.js";

async function createChannel(category: CategoryChannel) {
await category.children.create({
type: ChannelType.GuildVoice,
name: `🔊・general${getSuperscriptNumber(category.children.cache.size + 1)}`,
});
}
can i use the undocumented https://discord.com/api/v9/guilds/GUILD_ID/onboarding or will discord get mad? ok then, in Discord.JS, how do I send the raw API request while using all of the ratelimit handling things in Discord.JS?
probablyraging
Could use node-fetch to make a http request Still not really DJS related though 😄 DJS is a library for interacting with the Discord API routes. Some newer routes may not be available in DJS yet. So until they are, it's not really DJS related
jackssrt
jackssrtOP2y ago
will client.rest() handle ratelimiting and stuff? oh ok, i use typescript so that won't be a problem
Want results from more Discord servers?
Add your server