Skip to content

Commit

Permalink
Use dash as default button label to avoid API errors
Browse files Browse the repository at this point in the history
  • Loading branch information
utarwyn committed Feb 15, 2023
1 parent f4e7185 commit db9b5c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/GameBoardButtonBuilder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ describe('GameBoardButtonBuilder', () => {
expect(options.components![0].components).toHaveLength(2);
expect(options.components![1].components).toHaveLength(2);
expect((options.components![0].components[0] as MessageButton).label).toBe('X');
expect((options.components![0].components[1] as MessageButton).label).toBe(' ');
expect((options.components![1].components[0] as MessageButton).label).toBe(' ');
expect((options.components![0].components[1] as MessageButton).label).toBe('-');
expect((options.components![1].components[0] as MessageButton).label).toBe('-');
expect((options.components![1].components[1] as MessageButton).label).toBe('O');
});

Expand Down
2 changes: 1 addition & 1 deletion src/bot/builder/GameBoardButtonBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class GameBoardButtonBuilder extends GameBoardBuilder {
* Default labels used on buttons if emojies are not enabled.
* @protected
*/
private buttonLabels = [' ', 'X', 'O'];
private buttonLabels = ['-', 'X', 'O'];
/**
* Button styles used for representing the two players.
* @private
Expand Down

0 comments on commit db9b5c2

Please sign in to comment.