Skip to content

Commit

Permalink
Fix JoinCommand interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbeil committed May 14, 2024
1 parent e423b73 commit e83589f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/Discord/Command/JoinTransportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ public function callback(Discord $discord): void
}

if (!($this->userCanJoinTransport)($event, $user, $transport)) {
$interaction->updateMessage(MessageBuilder::new()->setContent($this->translator->trans('discord.join_transport.error.same_configuration'))->setComponents([])->setEmbeds([]));
$interaction->respondWithMessage(MessageBuilder::new()->setContent($this->translator->trans('discord.join_transport.error.same_configuration')), true);

return;
}

if ($transport->seats === $transport->travelers->count()) {
$interaction->updateMessage(MessageBuilder::new()->setContent($this->translator->trans('discord.join_transport.error.transport_full'))->setComponents([])->setEmbeds([]));
$interaction->respondWithMessage(MessageBuilder::new()->setContent($this->translator->trans('discord.join_transport.error.transport_full')), true);

return;
}
Expand Down

0 comments on commit e83589f

Please sign in to comment.