The token used for authentication with the Discord API.
The ID of the guild in which to create the channel.
The name of the channel to create.
The ID of the member for whom the channel is being created.
A promise that resolves to the newly created TextChannel.
Will throw an error if there is a problem creating the channel.
const token = 'your_discord_token_here';
const guildId = 'your_guild_id_here';
const channelName = 'text-channel';
const memberId = 'your_member_id_here';
const channel = await createTextChannel(token, guildId, channelName, memberId)
console.log(`Channel created with ID: ${channel.id}`)
Generated using TypeDoc
Creates a text channel within a guild with specified permissions.