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

refactor(Embed): remove add field #7522

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions packages/builders/__tests__/messages/embed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,15 +318,6 @@ describe('Embed', () => {
});
});

test('GIVEN an embed using Embed#addField THEN returns valid toJSON data', () => {
const embed = new Embed();
embed.addField({ name: 'foo', value: 'bar' });

expect(embed.toJSON()).toStrictEqual({
fields: [{ name: 'foo', value: 'bar' }],
});
});

test('GIVEN an embed using Embed#addFields THEN returns valid toJSON data', () => {
const embed = new Embed();
embed.addFields({ name: 'foo', value: 'bar' });
Expand Down
9 changes: 0 additions & 9 deletions packages/builders/src/messages/embed/UnsafeEmbed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,6 @@ export class UnsafeEmbed implements Equatable<APIEmbed | UnsafeEmbed> {
return typeof this.data.color === 'number' ? `#${this.data.color.toString(16).padStart(6, '0')}` : this.data.color;
}

/**
* Adds a field to the embed (max 25)
*
* @param field The field to add.
*/
public addField(field: APIEmbedField): this {
return this.addFields(field);
}

/**
* Adds fields to the embed (max 25)
*
Expand Down