From c48dbda47bc3e6187139540394b9b0fa5065adcd Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 13 Nov 2024 15:16:27 -0500 Subject: [PATCH] Encode scope parameter to JSON in SetMyCommands method --- src/TgBotLib/Methods/SetMyCommands.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TgBotLib/Methods/SetMyCommands.php b/src/TgBotLib/Methods/SetMyCommands.php index ddf2c9d..10cbae9 100644 --- a/src/TgBotLib/Methods/SetMyCommands.php +++ b/src/TgBotLib/Methods/SetMyCommands.php @@ -22,7 +22,7 @@ if(isset($parameters['scope']) && $parameters['scope'] instanceof ObjectTypeInterface) { - $parameters['scope'] = $parameters['scope']->toArray(); + $parameters['scope'] = json_encode($parameters['scope']->toArray()); } return (bool)self::executeCurl(self::buildPost($bot, Methods::SET_MY_COMMANDS->value, $parameters));