Skip to content

Commit 62124db

Browse files
committed
chore: some requested changes
1 parent 507cbc6 commit 62124db

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/builders/src/components/Component.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import type { JSONEncodable } from '@discordjs/util';
22
import type { APIBaseComponent, ComponentType } from 'discord-api-types/v10';
33

4+
export interface ComponentBuilderBaseData {
5+
id?: number | undefined;
6+
}
7+
48
/**
59
* The base component builder that contains common symbols for all sorts of components.
610
*
@@ -9,7 +13,7 @@ import type { APIBaseComponent, ComponentType } from 'discord-api-types/v10';
913
export abstract class ComponentBuilder<Component extends APIBaseComponent<ComponentType>>
1014
implements JSONEncodable<Component>
1115
{
12-
protected abstract readonly data: { id?: number | undefined };
16+
protected abstract readonly data: ComponentBuilderBaseData;
1317

1418
/**
1519
* Sets the id of this component.

packages/builders/src/components/v2/Separator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export class SeparatorBuilder extends ComponentBuilder<APISeparatorComponent> {
4141
*
4242
* @param divider - Whether to show a divider line
4343
*/
44-
public setDivider(divider: boolean) {
44+
public setDivider(divider = true) {
4545
this.data.divider = divider;
4646
return this;
4747
}

0 commit comments

Comments
 (0)