Skip to content

Commit

Permalink
Fix typo in GameBoard class
Browse files Browse the repository at this point in the history
  • Loading branch information
utarwyn committed Jan 24, 2022
1 parent 3362554 commit 5491e05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/bot/entity/GameBoard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,12 @@ export default class GameBoard {

/**
* Updates the message.
*
* @param interaction interaction to update if action was triggered by it
*/
public async update(interaction?: ButtonInteraction): Promise<void> {
if (interaction) {
await interaction.update(this.content);
return interaction.update(this.content);
} else {
return this.tunnel.editReply(this.content);
}
Expand All @@ -203,7 +205,7 @@ export default class GameBoard {
collected: Collection<Snowflake, MessageReaction>
): Promise<void> {
const move = GameBoardBuilder.MOVE_REACTIONS.indexOf(collected.first()!.emoji.name!);
await this.playTurn(move);
return this.playTurn(move);
}

/**
Expand All @@ -221,6 +223,7 @@ export default class GameBoard {
* Play the current player's turn with a specific move.
*
* @param move move to play for the current player
* @param interaction interaction to update if action was triggered by it
* @private
*/
private async playTurn(move: number, interaction?: ButtonInteraction): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/bot/entity/GameBoardButtonBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class GameBoardButtonBuilder extends GameBoardBuilder {
* @inheritdoc
* @override
*/
withEntityPlaying(entity?: Entity): GameBoardBuilder {
override withEntityPlaying(entity?: Entity): GameBoardBuilder {
// Do not display state if game is loading
if (entity) {
return super.withEntityPlaying(entity);
Expand Down

0 comments on commit 5491e05

Please sign in to comment.