Skip to content

Incorrect method .addComponents() shown in ContainerBuilder documentation #11300

@rohitsivakumar30643

Description

@rohitsivakumar30643

Which application is this bug report for?

Documentation

Issue description

The documentation example for ContainerBuilder shows a method call:

.addComponents(separator, section)

However, .addComponents() does not exist in the discord.js builders API.

The correct methods are:

  • .addSeparatorComponents(separator)
  • .addSectionComponents(section)

This incorrect example appears in:
packages/builders/src/components/v2/Container.ts

This can confuse developers and cause TypeErrors when they copy the example.

Steps to Reproduce

  1. Open the file: packages/builders/src/components/v2/Container.ts
  2. Scroll to the example block under ContainerBuilder documentation
  3. Observe that .addComponents(separator, section) is used
  4. This method is not present in the actual API

Versions

  • Windows 11
  • Chrome 120

Issue priority

Low (slightly annoying)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions