Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type property in component constructors is required #7342

Closed
ImRodry opened this issue Jan 25, 2022 · 1 comment · Fixed by #7391
Closed

type property in component constructors is required #7342

ImRodry opened this issue Jan 25, 2022 · 1 comment · Fixed by #7391

Comments

@ImRodry
Copy link
Contributor

ImRodry commented Jan 25, 2022

Which package is this bug report for?

builders

Issue description

When passing a data object to the constructor of any component (aka ActionRow, ButtonComponent or SelectMenuComponent) the type parameter is required even though this isn't needed as it is set as a constant in the class and not read from the data passed to the constructor.

Code sample

const row = new ActionRow({
	components: [
		new ButtonComponent({
			style: 1,
			label: 'test',
			custom_id: 'test',
		}),
		new SelectMenuComponent({
			custom_id: 'test',
			options: [
				{
					label: 'test',
					value: 'test',
				}
			]
		})
	],
});

Package version

0.12.0

Node.js version

16.13.1

Operating system

Windows 11

Priority this issue should have

High (immediate attention needed)

Which partials do you have configured?

Not applicable (subpackage bug)

Which gateway intents are you subscribing to?

Not applicable (subpackage bug)

I have tested this issue on a development release

No response

@Th1983

This comment has been minimized.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants