• Creates a text channel within a guild with specified permissions.

    Parameters

    • token: string

      The token used for authentication with the Discord API.

    • guildId: string

      The ID of the guild in which to create the channel.

    • channelName: string

      The name of the channel to create.

    • memberId: string

      The ID of the member for whom the channel is being created.

    Returns Promise<TextChannel>

    A promise that resolves to the newly created TextChannel.

    Throws

    Will throw an error if there is a problem creating the channel.

    Example

    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