We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add Google Style Docstrings
We should implement Google Style Docstrings to every function, method, class in opsdroid. This style will support existing documentation and will help in the future by generating documentation automatically.

This consists in a bit of effort so this issue can be worked by more than one contributor, just make sure that everyone knows what you are working on in order to avoid other contributors spending time on something that you are working on.

If you are unfamiliar with the Google Style Docstrings I'd recommend that you check these resources:

 - [Sphix 1.8.0+ - Google Style Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)



Docstrings that need to be updated:

- main.py
  - [x] configure_lang
  - [ ] configure_log
  - [ ] get_logging_level
  - [ ] check_dependencies
  - [ ] print_version
  - [ ] print_example_config
  - [ ] edit_files
  - [x] welcome_message
- ~~helper.py~~
  - [x] get_opsdroid
  - [x] del_rw
  - [x] move_config_to_appdir
- memory.py
  - [x] Memory
  - [x] get
  - [x] put
  - [x] _get_from_database
  - [x] _put_to_database
- message.py
  - [x] Message
  - [x]  __init__
  - [x]  _thinking_delay
  - [x]  _typing delay
  - [x]  respond
  - [x]  react
- web.py
  - [ ] Web
  - [x] get_port
  - [x] get_host
  - [x]  get_ssl_context
  - [ ]  start
  - [ ]  build_response
  - [ ]  web_index_handler
  - [ ]  web_stats_handler
- matchers.py
  - [ ] match_regex
  - [ ] match_apiai_action
  - [ ] match_apiai_intent
  - [ ]  match_dialogflow_action
  - [ ]  match_dialogflow_intent
  - [ ] match_luisai_intent
  - [ ] match_rasanlu
  - [ ] match_recastai
  - [ ] match_witai
  - [ ] match_crontab
  - [ ] match_webhook
  - [ ] match_always
- core.py
  - [ ] OpsDroid
  - [ ] default_connector
  - [ ] exit
  - [ ] critical
  - [ ]  call_stop
  - [ ] disconnect
  - [ ] stop
  - [ ] load
  - [ ] start_loop
  - [x] setup_skills
  - [ ] train_parsers
  - [ ] start_connector_tasks
  - [ ] start_database
  - [ ] run_skill
  - [ ] get_ranked_skills
  - [ ] parse
- loader.py
  - [ ] Loader
  - [x] import_module_from_spec
  - [x] import_module
  - [x] check_cache
  - [x] build_module_import_path
  - [x] build_module_install_path
  - [x] git_clone
  - [x] git_pull
  - [x] pip_install_deps
  - [x] create_default_config
  - [x] load_config_file
  - [ ] envvar_constructor
  - [ ] include_constructor
  - [x] setup_modules_directory
  - [x] load_modules_from_config
  - [x] _load_modules
  - [x] _install_module
  - [x] _update_module
  - [ ] _install_git_module
  - [x] _install_local_module









---- ORIGINAL POST ---- 
I've been wondering about this for a while now and I would like to know if we should replace/update all the docstrings in opsdroid with the Google Style doc strings. 

I think this could help new and old contributors to contribute and commit to opsdroid since the Google Style docstrings give more information about every method/function and specifies clearly what sort of input the function/method expects, what will it return and what will be raised (if applicable).

The downsize of this style is that the length of every .py file will increase due to the doc strings, but since most IDE's allow you to hide those fields it shouldn't be too bad.

Here is a good example of Google Style Doc strings:  [Sphix 1.8.0+ - Google Style Docstrings](http://www.sphinx-doc.org/en/master/ext/example_google.html)

I would like to know what you all think about this idea and if its worth spending time on it.
Add Google Style Docstrings
We should implement Google Style Docstrings to every function, method, class in opsdroid. This style will support existing documentation and will help in the future by generating documentation automatically.

This consists in a bit of effort so this issue can be worked by more than one contributor, just make sure that everyone knows what you are working on in order to avoid other contributors spending time on something that you are working on.

If you are unfamiliar with the Google Style Docstrings I'd recommend that you check these resources:

 - [Sphix 1.8.0+ - Google Style Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)



Docstrings that need to be updated:

- main.py
  - [x] configure_lang
  - [ ] configure_log
  - [ ] get_logging_level
  - [ ] check_dependencies
  - [ ] print_version
  - [ ] print_example_config
  - [ ] edit_files
  - [x] welcome_message
- ~~helper.py~~
  - [x] get_opsdroid
  - [x] del_rw
  - [x] move_config_to_appdir
- memory.py
  - [x] Memory
  - [x] get
  - [x] put
  - [x] _get_from_database
  - [x] _put_to_database
- message.py
  - [x] Message
  - [x]  __init__
  - [x]  _thinking_delay
  - [x]  _typing delay
  - [x]  respond
  - [x]  react
- web.py
  - [ ] Web
  - [x] get_port
  - [x] get_host
  - [x]  get_ssl_context
  - [ ]  start
  - [ ]  build_response
  - [ ]  web_index_handler
  - [ ]  web_stats_handler
- matchers.py
  - [ ] match_regex
  - [ ] match_apiai_action
  - [ ] match_apiai_intent
  - [ ]  match_dialogflow_action
  - [ ]  match_dialogflow_intent
  - [ ] match_luisai_intent
  - [ ] match_rasanlu
  - [ ] match_recastai
  - [ ] match_witai
  - [ ] match_crontab
  - [ ] match_webhook
  - [ ] match_always
- core.py
  - [ ] OpsDroid
  - [ ] default_connector
  - [ ] exit
  - [ ] critical
  - [ ]  call_stop
  - [ ] disconnect
  - [ ] stop
  - [ ] load
  - [ ] start_loop
  - [x] setup_skills
  - [ ] train_parsers
  - [ ] start_connector_tasks
  - [ ] start_database
  - [ ] run_skill
  - [ ] get_ranked_skills
  - [ ] parse
- loader.py
  - [ ] Loader
  - [x] import_module_from_spec
  - [x] import_module
  - [x] check_cache
  - [x] build_module_import_path
  - [x] build_module_install_path
  - [x] git_clone
  - [x] git_pull
  - [x] pip_install_deps
  - [x] create_default_config
  - [x] load_config_file
  - [ ] envvar_constructor
  - [ ] include_constructor
  - [x] setup_modules_directory
  - [x] load_modules_from_config
  - [x] _load_modules
  - [x] _install_module
  - [x] _update_module
  - [ ] _install_git_module
  - [x] _install_local_module









---- ORIGINAL POST ---- 
I've been wondering about this for a while now and I would like to know if we should replace/update all the docstrings in opsdroid with the Google Style doc strings. 

I think this could help new and old contributors to contribute and commit to opsdroid since the Google Style docstrings give more information about every method/function and specifies clearly what sort of input the function/method expects, what will it return and what will be raised (if applicable).

The downsize of this style is that the length of every .py file will increase due to the doc strings, but since most IDE's allow you to hide those fields it shouldn't be too bad.

Here is a good example of Google Style Doc strings:  [Sphix 1.8.0+ - Google Style Docstrings](http://www.sphinx-doc.org/en/master/ext/example_google.html)

I would like to know what you all think about this idea and if its worth spending time on it.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `opsdroid/message.py`
Content:
```
1 """Class to encapsulate a message."""
2 
3 from datetime import datetime
4 from copy import copy
5 import asyncio
6 from random import randrange
7 
8 from opsdroid.helper import get_opsdroid
9 
10 
11 class Message:
12     # pylint: disable=too-few-public-methods
13     """A message object."""
14 
15     def __init__(self, text, user, room, connector, raw_message=None):
16         """Create object with minimum properties."""
17         self.created = datetime.now()
18         self.text = text
19         self.user = user
20         self.room = room
21         self.connector = connector
22         self.raw_message = raw_message
23         self.regex = None
24         self.responded_to = False
25 
26     async def _thinking_delay(self):
27         """Make opsdroid wait x-seconds before responding."""
28         seconds = self.connector.configuration.get('thinking-delay', 0)
29 
30         if isinstance(seconds, list):
31             seconds = randrange(seconds[0], seconds[1])
32 
33         await asyncio.sleep(seconds)
34 
35     async def _typing_delay(self, text):
36         """Simulate typing, takes an int or float to delay reply."""
37         seconds = self.connector.configuration.get('typing-delay', 0)
38         char_count = len(text)
39 
40         if isinstance(seconds, list):
41             seconds = randrange(seconds[0], seconds[1])
42 
43         await asyncio.sleep(char_count*seconds)
44 
45     async def respond(self, text, room=None):
46         """Respond to this message using the connector it was created by."""
47         opsdroid = get_opsdroid()
48         response = copy(self)
49         response.text = text
50 
51         if 'thinking-delay' in self.connector.configuration or \
52            'typing-delay' in self.connector.configuration:
53             await self._thinking_delay()
54             await self._typing_delay(response.text)
55 
56         await self.connector.respond(response, room)
57         if not self.responded_to:
58             now = datetime.now()
59             opsdroid.stats["total_responses"] = \
60                 opsdroid.stats["total_responses"] + 1
61             opsdroid.stats["total_response_time"] = \
62                 opsdroid.stats["total_response_time"] + \
63                 (now - self.created).total_seconds()
64             self.responded_to = True
65 
66     async def react(self, emoji):
67         """React to this message using the connector it was created by."""
68         if 'thinking-delay' in self.connector.configuration:
69             await self._thinking_delay()
70         return await self.connector.react(self, emoji)
71
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/opsdroid/message.py b/opsdroid/message.py
--- a/opsdroid/message.py
+++ b/opsdroid/message.py
@@ -10,7 +10,31 @@
 
 class Message:
     # pylint: disable=too-few-public-methods
-    """A message object."""
+    """A message object.
+
+    Stores messages in a format that allows OpsDroid to respond or react with
+    delays for thinking and typing as defined in configuration YAML file.
+
+    Args:
+        text: String text of message
+        user: String name of user sending message
+        room: String name of the room or chat channel in which message was sent
+        connector: Connector object used to interact with given chat service
+        raw_message: Raw message as provided by chat service. None by default
+
+    Attributes:
+        created: Local date and time that message object was created
+        text: Text of message as string
+        user: String name of user sending message
+        room: String name of the room or chat channel in which message was sent
+        connector: Connector object used to interact with given chat service
+        raw_message: Raw message provided by chat service
+        regex: A re match object for the regular expression message was matched
+            against
+        responded_to: Boolean initialized as False. True if message has been
+            responded to
+
+    """
 
     def __init__(self, text, user, room, connector, raw_message=None):
         """Create object with minimum properties."""
@@ -24,7 +48,10 @@
         self.responded_to = False
 
     async def _thinking_delay(self):
-        """Make opsdroid wait x-seconds before responding."""
+        """Make opsdroid wait x-seconds before responding.
+
+        Number of seconds defined in YAML config. file, accessed via connector.
+        """
         seconds = self.connector.configuration.get('thinking-delay', 0)
 
         if isinstance(seconds, list):
@@ -33,7 +60,11 @@
         await asyncio.sleep(seconds)
 
     async def _typing_delay(self, text):
-        """Simulate typing, takes an int or float to delay reply."""
+        """Delays reply to simulate typing.
+
+        Seconds to delay equals number of characters in response multiplied by
+        number of seconds defined in YAML config. file, accessed via connector.
+        """
         seconds = self.connector.configuration.get('typing-delay', 0)
         char_count = len(text)
 
@@ -43,7 +74,13 @@
         await asyncio.sleep(char_count*seconds)
 
     async def respond(self, text, room=None):
-        """Respond to this message using the connector it was created by."""
+        """Respond to this message using the connector it was created by.
+
+        Creates copy of this message with updated text as response.
+        Delays message if thinking or typing delay present in config. file.
+        Updates responded_to attribute to True if False.
+        Logs response and response time in OpsDroid object stats.
+        """
         opsdroid = get_opsdroid()
         response = copy(self)
         response.text = text
@@ -64,7 +101,17 @@
             self.responded_to = True
 
     async def react(self, emoji):
-        """React to this message using the connector it was created by."""
+        """React to this message with emoji using the specified connector.
+
+        Delays message if thinking delay present in config. file.
+
+        Args:
+            emoji: Sting name of emoji with which OpsDroid will react.
+
+        Returns:
+            bool: True for message successfully sent. False otherwise.
+
+        """
         if 'thinking-delay' in self.connector.configuration:
             await self._thinking_delay()
         return await self.connector.react(self, emoji)

{"golden_diff": "diff --git a/opsdroid/message.py b/opsdroid/message.py\n--- a/opsdroid/message.py\n+++ b/opsdroid/message.py\n@@ -10,7 +10,31 @@\n \n class Message:\n     # pylint: disable=too-few-public-methods\n-    \"\"\"A message object.\"\"\"\n+    \"\"\"A message object.\n+\n+    Stores messages in a format that allows OpsDroid to respond or react with\n+    delays for thinking and typing as defined in configuration YAML file.\n+\n+    Args:\n+        text: String text of message\n+        user: String name of user sending message\n+        room: String name of the room or chat channel in which message was sent\n+        connector: Connector object used to interact with given chat service\n+        raw_message: Raw message as provided by chat service. None by default\n+\n+    Attributes:\n+        created: Local date and time that message object was created\n+        text: Text of message as string\n+        user: String name of user sending message\n+        room: String name of the room or chat channel in which message was sent\n+        connector: Connector object used to interact with given chat service\n+        raw_message: Raw message provided by chat service\n+        regex: A re match object for the regular expression message was matched\n+            against\n+        responded_to: Boolean initialized as False. True if message has been\n+            responded to\n+\n+    \"\"\"\n \n     def __init__(self, text, user, room, connector, raw_message=None):\n         \"\"\"Create object with minimum properties.\"\"\"\n@@ -24,7 +48,10 @@\n         self.responded_to = False\n \n     async def _thinking_delay(self):\n-        \"\"\"Make opsdroid wait x-seconds before responding.\"\"\"\n+        \"\"\"Make opsdroid wait x-seconds before responding.\n+\n+        Number of seconds defined in YAML config. file, accessed via connector.\n+        \"\"\"\n         seconds = self.connector.configuration.get('thinking-delay', 0)\n \n         if isinstance(seconds, list):\n@@ -33,7 +60,11 @@\n         await asyncio.sleep(seconds)\n \n     async def _typing_delay(self, text):\n-        \"\"\"Simulate typing, takes an int or float to delay reply.\"\"\"\n+        \"\"\"Delays reply to simulate typing.\n+\n+        Seconds to delay equals number of characters in response multiplied by\n+        number of seconds defined in YAML config. file, accessed via connector.\n+        \"\"\"\n         seconds = self.connector.configuration.get('typing-delay', 0)\n         char_count = len(text)\n \n@@ -43,7 +74,13 @@\n         await asyncio.sleep(char_count*seconds)\n \n     async def respond(self, text, room=None):\n-        \"\"\"Respond to this message using the connector it was created by.\"\"\"\n+        \"\"\"Respond to this message using the connector it was created by.\n+\n+        Creates copy of this message with updated text as response.\n+        Delays message if thinking or typing delay present in config. file.\n+        Updates responded_to attribute to True if False.\n+        Logs response and response time in OpsDroid object stats.\n+        \"\"\"\n         opsdroid = get_opsdroid()\n         response = copy(self)\n         response.text = text\n@@ -64,7 +101,17 @@\n             self.responded_to = True\n \n     async def react(self, emoji):\n-        \"\"\"React to this message using the connector it was created by.\"\"\"\n+        \"\"\"React to this message with emoji using the specified connector.\n+\n+        Delays message if thinking delay present in config. file.\n+\n+        Args:\n+            emoji: Sting name of emoji with which OpsDroid will react.\n+\n+        Returns:\n+            bool: True for message successfully sent. False otherwise.\n+\n+        \"\"\"\n         if 'thinking-delay' in self.connector.configuration:\n             await self._thinking_delay()\n         return await self.connector.react(self, emoji)\n", "issue": "Add Google Style Docstrings\nWe should implement Google Style Docstrings to every function, method, class in opsdroid. This style will support existing documentation and will help in the future by generating documentation automatically.\r\n\r\nThis consists in a bit of effort so this issue can be worked by more than one contributor, just make sure that everyone knows what you are working on in order to avoid other contributors spending time on something that you are working on.\r\n\r\nIf you are unfamiliar with the Google Style Docstrings I'd recommend that you check these resources:\r\n\r\n - [Sphix 1.8.0+ - Google Style Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)\r\n\r\n\r\n\r\nDocstrings that need to be updated:\r\n\r\n- main.py\r\n  - [x] configure_lang\r\n  - [ ] configure_log\r\n  - [ ] get_logging_level\r\n  - [ ] check_dependencies\r\n  - [ ] print_version\r\n  - [ ] print_example_config\r\n  - [ ] edit_files\r\n  - [x] welcome_message\r\n- ~~helper.py~~\r\n  - [x] get_opsdroid\r\n  - [x] del_rw\r\n  - [x] move_config_to_appdir\r\n- memory.py\r\n  - [x] Memory\r\n  - [x] get\r\n  - [x] put\r\n  - [x] _get_from_database\r\n  - [x] _put_to_database\r\n- message.py\r\n  - [x] Message\r\n  - [x]  __init__\r\n  - [x]  _thinking_delay\r\n  - [x]  _typing delay\r\n  - [x]  respond\r\n  - [x]  react\r\n- web.py\r\n  - [ ] Web\r\n  - [x] get_port\r\n  - [x] get_host\r\n  - [x]  get_ssl_context\r\n  - [ ]  start\r\n  - [ ]  build_response\r\n  - [ ]  web_index_handler\r\n  - [ ]  web_stats_handler\r\n- matchers.py\r\n  - [ ] match_regex\r\n  - [ ] match_apiai_action\r\n  - [ ] match_apiai_intent\r\n  - [ ]  match_dialogflow_action\r\n  - [ ]  match_dialogflow_intent\r\n  - [ ] match_luisai_intent\r\n  - [ ] match_rasanlu\r\n  - [ ] match_recastai\r\n  - [ ] match_witai\r\n  - [ ] match_crontab\r\n  - [ ] match_webhook\r\n  - [ ] match_always\r\n- core.py\r\n  - [ ] OpsDroid\r\n  - [ ] default_connector\r\n  - [ ] exit\r\n  - [ ] critical\r\n  - [ ]  call_stop\r\n  - [ ] disconnect\r\n  - [ ] stop\r\n  - [ ] load\r\n  - [ ] start_loop\r\n  - [x] setup_skills\r\n  - [ ] train_parsers\r\n  - [ ] start_connector_tasks\r\n  - [ ] start_database\r\n  - [ ] run_skill\r\n  - [ ] get_ranked_skills\r\n  - [ ] parse\r\n- loader.py\r\n  - [ ] Loader\r\n  - [x] import_module_from_spec\r\n  - [x] import_module\r\n  - [x] check_cache\r\n  - [x] build_module_import_path\r\n  - [x] build_module_install_path\r\n  - [x] git_clone\r\n  - [x] git_pull\r\n  - [x] pip_install_deps\r\n  - [x] create_default_config\r\n  - [x] load_config_file\r\n  - [ ] envvar_constructor\r\n  - [ ] include_constructor\r\n  - [x] setup_modules_directory\r\n  - [x] load_modules_from_config\r\n  - [x] _load_modules\r\n  - [x] _install_module\r\n  - [x] _update_module\r\n  - [ ] _install_git_module\r\n  - [x] _install_local_module\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n---- ORIGINAL POST ---- \r\nI've been wondering about this for a while now and I would like to know if we should replace/update all the docstrings in opsdroid with the Google Style doc strings. \r\n\r\nI think this could help new and old contributors to contribute and commit to opsdroid since the Google Style docstrings give more information about every method/function and specifies clearly what sort of input the function/method expects, what will it return and what will be raised (if applicable).\r\n\r\nThe downsize of this style is that the length of every .py file will increase due to the doc strings, but since most IDE's allow you to hide those fields it shouldn't be too bad.\r\n\r\nHere is a good example of Google Style Doc strings:  [Sphix 1.8.0+ - Google Style Docstrings](http://www.sphinx-doc.org/en/master/ext/example_google.html)\r\n\r\nI would like to know what you all think about this idea and if its worth spending time on it.\nAdd Google Style Docstrings\nWe should implement Google Style Docstrings to every function, method, class in opsdroid. This style will support existing documentation and will help in the future by generating documentation automatically.\r\n\r\nThis consists in a bit of effort so this issue can be worked by more than one contributor, just make sure that everyone knows what you are working on in order to avoid other contributors spending time on something that you are working on.\r\n\r\nIf you are unfamiliar with the Google Style Docstrings I'd recommend that you check these resources:\r\n\r\n - [Sphix 1.8.0+ - Google Style Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)\r\n\r\n\r\n\r\nDocstrings that need to be updated:\r\n\r\n- main.py\r\n  - [x] configure_lang\r\n  - [ ] configure_log\r\n  - [ ] get_logging_level\r\n  - [ ] check_dependencies\r\n  - [ ] print_version\r\n  - [ ] print_example_config\r\n  - [ ] edit_files\r\n  - [x] welcome_message\r\n- ~~helper.py~~\r\n  - [x] get_opsdroid\r\n  - [x] del_rw\r\n  - [x] move_config_to_appdir\r\n- memory.py\r\n  - [x] Memory\r\n  - [x] get\r\n  - [x] put\r\n  - [x] _get_from_database\r\n  - [x] _put_to_database\r\n- message.py\r\n  - [x] Message\r\n  - [x]  __init__\r\n  - [x]  _thinking_delay\r\n  - [x]  _typing delay\r\n  - [x]  respond\r\n  - [x]  react\r\n- web.py\r\n  - [ ] Web\r\n  - [x] get_port\r\n  - [x] get_host\r\n  - [x]  get_ssl_context\r\n  - [ ]  start\r\n  - [ ]  build_response\r\n  - [ ]  web_index_handler\r\n  - [ ]  web_stats_handler\r\n- matchers.py\r\n  - [ ] match_regex\r\n  - [ ] match_apiai_action\r\n  - [ ] match_apiai_intent\r\n  - [ ]  match_dialogflow_action\r\n  - [ ]  match_dialogflow_intent\r\n  - [ ] match_luisai_intent\r\n  - [ ] match_rasanlu\r\n  - [ ] match_recastai\r\n  - [ ] match_witai\r\n  - [ ] match_crontab\r\n  - [ ] match_webhook\r\n  - [ ] match_always\r\n- core.py\r\n  - [ ] OpsDroid\r\n  - [ ] default_connector\r\n  - [ ] exit\r\n  - [ ] critical\r\n  - [ ]  call_stop\r\n  - [ ] disconnect\r\n  - [ ] stop\r\n  - [ ] load\r\n  - [ ] start_loop\r\n  - [x] setup_skills\r\n  - [ ] train_parsers\r\n  - [ ] start_connector_tasks\r\n  - [ ] start_database\r\n  - [ ] run_skill\r\n  - [ ] get_ranked_skills\r\n  - [ ] parse\r\n- loader.py\r\n  - [ ] Loader\r\n  - [x] import_module_from_spec\r\n  - [x] import_module\r\n  - [x] check_cache\r\n  - [x] build_module_import_path\r\n  - [x] build_module_install_path\r\n  - [x] git_clone\r\n  - [x] git_pull\r\n  - [x] pip_install_deps\r\n  - [x] create_default_config\r\n  - [x] load_config_file\r\n  - [ ] envvar_constructor\r\n  - [ ] include_constructor\r\n  - [x] setup_modules_directory\r\n  - [x] load_modules_from_config\r\n  - [x] _load_modules\r\n  - [x] _install_module\r\n  - [x] _update_module\r\n  - [ ] _install_git_module\r\n  - [x] _install_local_module\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n---- ORIGINAL POST ---- \r\nI've been wondering about this for a while now and I would like to know if we should replace/update all the docstrings in opsdroid with the Google Style doc strings. \r\n\r\nI think this could help new and old contributors to contribute and commit to opsdroid since the Google Style docstrings give more information about every method/function and specifies clearly what sort of input the function/method expects, what will it return and what will be raised (if applicable).\r\n\r\nThe downsize of this style is that the length of every .py file will increase due to the doc strings, but since most IDE's allow you to hide those fields it shouldn't be too bad.\r\n\r\nHere is a good example of Google Style Doc strings:  [Sphix 1.8.0+ - Google Style Docstrings](http://www.sphinx-doc.org/en/master/ext/example_google.html)\r\n\r\nI would like to know what you all think about this idea and if its worth spending time on it.\n", "before_files": [{"content": "\"\"\"Class to encapsulate a message.\"\"\"\n\nfrom datetime import datetime\nfrom copy import copy\nimport asyncio\nfrom random import randrange\n\nfrom opsdroid.helper import get_opsdroid\n\n\nclass Message:\n    # pylint: disable=too-few-public-methods\n    \"\"\"A message object.\"\"\"\n\n    def __init__(self, text, user, room, connector, raw_message=None):\n        \"\"\"Create object with minimum properties.\"\"\"\n        self.created = datetime.now()\n        self.text = text\n        self.user = user\n        self.room = room\n        self.connector = connector\n        self.raw_message = raw_message\n        self.regex = None\n        self.responded_to = False\n\n    async def _thinking_delay(self):\n        \"\"\"Make opsdroid wait x-seconds before responding.\"\"\"\n        seconds = self.connector.configuration.get('thinking-delay', 0)\n\n        if isinstance(seconds, list):\n            seconds = randrange(seconds[0], seconds[1])\n\n        await asyncio.sleep(seconds)\n\n    async def _typing_delay(self, text):\n        \"\"\"Simulate typing, takes an int or float to delay reply.\"\"\"\n        seconds = self.connector.configuration.get('typing-delay', 0)\n        char_count = len(text)\n\n        if isinstance(seconds, list):\n            seconds = randrange(seconds[0], seconds[1])\n\n        await asyncio.sleep(char_count*seconds)\n\n    async def respond(self, text, room=None):\n        \"\"\"Respond to this message using the connector it was created by.\"\"\"\n        opsdroid = get_opsdroid()\n        response = copy(self)\n        response.text = text\n\n        if 'thinking-delay' in self.connector.configuration or \\\n           'typing-delay' in self.connector.configuration:\n            await self._thinking_delay()\n            await self._typing_delay(response.text)\n\n        await self.connector.respond(response, room)\n        if not self.responded_to:\n            now = datetime.now()\n            opsdroid.stats[\"total_responses\"] = \\\n                opsdroid.stats[\"total_responses\"] + 1\n            opsdroid.stats[\"total_response_time\"] = \\\n                opsdroid.stats[\"total_response_time\"] + \\\n                (now - self.created).total_seconds()\n            self.responded_to = True\n\n    async def react(self, emoji):\n        \"\"\"React to this message using the connector it was created by.\"\"\"\n        if 'thinking-delay' in self.connector.configuration:\n            await self._thinking_delay()\n        return await self.connector.react(self, emoji)\n", "path": "opsdroid/message.py"}], "after_files": [{"content": "\"\"\"Class to encapsulate a message.\"\"\"\n\nfrom datetime import datetime\nfrom copy import copy\nimport asyncio\nfrom random import randrange\n\nfrom opsdroid.helper import get_opsdroid\n\n\nclass Message:\n    # pylint: disable=too-few-public-methods\n    \"\"\"A message object.\n\n    Stores messages in a format that allows OpsDroid to respond or react with\n    delays for thinking and typing as defined in configuration YAML file.\n\n    Args:\n        text: String text of message\n        user: String name of user sending message\n        room: String name of the room or chat channel in which message was sent\n        connector: Connector object used to interact with given chat service\n        raw_message: Raw message as provided by chat service. None by default\n\n    Attributes:\n        created: Local date and time that message object was created\n        text: Text of message as string\n        user: String name of user sending message\n        room: String name of the room or chat channel in which message was sent\n        connector: Connector object used to interact with given chat service\n        raw_message: Raw message provided by chat service\n        regex: A re match object for the regular expression message was matched\n            against\n        responded_to: Boolean initialized as False. True if message has been\n            responded to\n\n    \"\"\"\n\n    def __init__(self, text, user, room, connector, raw_message=None):\n        \"\"\"Create object with minimum properties.\"\"\"\n        self.created = datetime.now()\n        self.text = text\n        self.user = user\n        self.room = room\n        self.connector = connector\n        self.raw_message = raw_message\n        self.regex = None\n        self.responded_to = False\n\n    async def _thinking_delay(self):\n        \"\"\"Make opsdroid wait x-seconds before responding.\n\n        Number of seconds defined in YAML config. file, accessed via connector.\n        \"\"\"\n        seconds = self.connector.configuration.get('thinking-delay', 0)\n\n        if isinstance(seconds, list):\n            seconds = randrange(seconds[0], seconds[1])\n\n        await asyncio.sleep(seconds)\n\n    async def _typing_delay(self, text):\n        \"\"\"Delays reply to simulate typing.\n\n        Seconds to delay equals number of characters in response multiplied by\n        number of seconds defined in YAML config. file, accessed via connector.\n        \"\"\"\n        seconds = self.connector.configuration.get('typing-delay', 0)\n        char_count = len(text)\n\n        if isinstance(seconds, list):\n            seconds = randrange(seconds[0], seconds[1])\n\n        await asyncio.sleep(char_count*seconds)\n\n    async def respond(self, text, room=None):\n        \"\"\"Respond to this message using the connector it was created by.\n\n        Creates copy of this message with updated text as response.\n        Delays message if thinking or typing delay present in config. file.\n        Updates responded_to attribute to True if False.\n        Logs response and response time in OpsDroid object stats.\n        \"\"\"\n        opsdroid = get_opsdroid()\n        response = copy(self)\n        response.text = text\n\n        if 'thinking-delay' in self.connector.configuration or \\\n           'typing-delay' in self.connector.configuration:\n            await self._thinking_delay()\n            await self._typing_delay(response.text)\n\n        await self.connector.respond(response, room)\n        if not self.responded_to:\n            now = datetime.now()\n            opsdroid.stats[\"total_responses\"] = \\\n                opsdroid.stats[\"total_responses\"] + 1\n            opsdroid.stats[\"total_response_time\"] = \\\n                opsdroid.stats[\"total_response_time\"] + \\\n                (now - self.created).total_seconds()\n            self.responded_to = True\n\n    async def react(self, emoji):\n        \"\"\"React to this message with emoji using the specified connector.\n\n        Delays message if thinking delay present in config. file.\n\n        Args:\n            emoji: Sting name of emoji with which OpsDroid will react.\n\n        Returns:\n            bool: True for message successfully sent. False otherwise.\n\n        \"\"\"\n        if 'thinking-delay' in self.connector.configuration:\n            await self._thinking_delay()\n        return await self.connector.react(self, emoji)\n", "path": "opsdroid/message.py"}]}