Class ChannelCreator

The ChannelCreator class provides methods to create, delete, rename, and move channels in a Discord guild.

Constructors

  • Creates an instance of ChannelCreator.

    Parameters

    • client: Client<boolean>

      The Discord client instance.

    Returns ChannelCreator

Properties

client: Client<boolean>

Methods

  • Creates a category channel in the specified guild.

    Parameters

    • guild: Guild

      The guild where the channel will be created.

    • name: string

      The name of the channel.

    Returns Promise<CategoryChannel>

    • A promise that resolves with the created category channel.
  • Creates a text channel in the specified guild.

    Parameters

    • guild: Guild

      The guild where the channel will be created.

    • name: string

      The name of the channel.

    Returns Promise<TextChannel>

    • A promise that resolves with the created text channel.
  • Creates a voice channel in the specified guild.

    Parameters

    • guild: Guild

      The guild where the channel will be created.

    • name: string

      The name of the channel.

    Returns Promise<VoiceChannel>

    • A promise that resolves with the created voice channel.
  • Deletes the specified channel.

    Parameters

    • channel: TextChannel | CategoryChannel | VoiceChannel

      The channel to be deleted.

    Returns Promise<void>

    • A promise that resolves when the channel is deleted.
  • Moves the specified channel to a new parent category.

    Parameters

    • channel: TextChannel | CategoryChannel | VoiceChannel

      The channel to be moved.

    • newParent: CategoryChannel

      The new parent category for the channel.

    Returns Promise<void>

    • A promise that resolves when the channel is moved.
  • Renames the specified channel.

    Parameters

    • channel: TextChannel | CategoryChannel | VoiceChannel

      The channel to be renamed.

    • newName: string

      The new name for the channel.

    Returns Promise<void>

    • A promise that resolves when the channel is renamed.

Generated using TypeDoc