Skip to content

Commit

Permalink
Fix error not resetting embeds & components when using CreateTranspor…
Browse files Browse the repository at this point in the history
…t command
  • Loading branch information
Korbeil committed May 21, 2024
1 parent 3f1663c commit 1c35783
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/Discord/Command/CreateTransportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function callback(Discord $discord): void
private function createTransport(Interaction $interaction, Event $event, User $user, int $seats, string $postalCode, \DateTimeImmutable $when, Direction $direction): void
{
if (!$this->checkTransportDateIsValid($when, $event, $direction)) {
$interaction->updateMessage(MessageBuilder::new()->setContent($this->translator->trans('discord.create_transport.error.too_far_date', ['date_start' => $event->startAt->format('j F Y'), 'date_end' => $event->finishAt->format('j F Y')])));
$interaction->updateMessage(MessageBuilder::new()->setContent($this->translator->trans('discord.create_transport.error.too_far_date', ['date_start' => $event->startAt->format('j F Y'), 'date_end' => $event->finishAt->format('j F Y')]))->setComponents([])->setEmbeds([]));

return;
}
Expand Down

0 comments on commit 1c35783

Please sign in to comment.