This pull request improves the getOption method by allowing it to search for nested options using a dot-separated path, like $option = $command->getOption('foo.bar'). This new approach replaces the previous method and provides better support for nested structures, especially for options of type ApplicationCommandOptionType::SUB_COMMAND. The old method does not support nested structures and will fail if you try to retrieve bar from foo.bar.
Would you mind adding a test case for retrieving a nested option? Could either be added to CommandInteractionTest@testParsesOptions or a new test case in that file :)
This pull request improves the getOption method by allowing it to search for nested options using a dot-separated path, like $option = $command->getOption('foo.bar'). This new approach replaces the previous method and provides better support for nested structures, especially for options of type ApplicationCommandOptionType::SUB_COMMAND. The old method does not support nested structures and will fail if you try to retrieve bar from foo.bar.