diff --git a/config/app.php b/config/app.php index c0e930e..4be6d44 100644 --- a/config/app.php +++ b/config/app.php @@ -26,7 +26,7 @@ | */ - 'locale' => 'en', + 'locale' => env('APP_LOCALE', 'en'), /* |-------------------------------------------------------------------------- @@ -39,7 +39,7 @@ | */ - 'fallback_locale' => 'en', + 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), /* |-------------------------------------------------------------------------- diff --git a/src/Discord/Message.php b/src/Discord/Message.php index 2a50a26..bb2376a 100644 --- a/src/Discord/Message.php +++ b/src/Discord/Message.php @@ -626,7 +626,7 @@ public function components(array $components): self /** * Add a URL button to the message. */ - public function button(string $label, mixed $value, mixed $emoji = null, ?string $style = null, bool $disabled = false, array $options = []): self + public function button(string $label, mixed $value, mixed $emoji = null, ?string $style = null, bool $disabled = false, ?string $id = null, array $options = []): self { $style = match ($style) { 'link' => Button::STYLE_LINK, @@ -644,6 +644,10 @@ public function button(string $label, mixed $value, mixed $emoji = null, ?string ->setEmoji($emoji) ->setDisabled($disabled); + if ($id) { + $button = $button->setCustomId($id); + } + if ($options) { foreach ($options as $key => $option) { $key = Str::of($key)->camel()->ucfirst()->start('set')->toString();