prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Cannot disconnect from SQLite
  <!-- Before you post an issue or if you are unsure about something join our gitter channel https://gitter.im/opsdroid/ and ask away! We are more than happy to help you. -->
  # Description
  SQLite database connector can’t disconnect because of wrong method signature.
  
  ## Steps to Reproduce
  Enable the SQLite database module, then try to shut down the bot.
  
  
  ## Expected Functionality
  The bot should shut down.
  
  ## Experienced Functionality
  This error message on the console, and the bot remains running (but with the connectors already disconnected).
  
  ```
  ERROR opsdroid.core: {'message': 'Task exception was never retrieved', 'exception': TypeError('disconnect() takes 1 positional argument but 2 were given',), 'future': <Task finished coro=<OpsDroid.handle_signal() done, defined at /home/polesz/.local/lib/python3.6/site-packages/opsdroid/core.py:121> exception=TypeError('disconnect() takes 1 positional argument but 2 were given',)>}
  ```
  
  ## Versions
  - **Opsdroid version:** 0.13.0
  - **Python version:** 3.6.6 (bundled with Fedora 28)
  - **OS/Docker version:** Fedora 28, no Docker involved
  
  ## Additional information
  It seems the method signature of `Database.disconnect()` is wrong (should be `async def disconnect(self, opsdroid)`) or the caller (`OpsDroid.unload()`) should not pass the `opsdroid` instance to `database.disconnect()` (personally i’d vote for the former).
  
  --- 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/database/__init__.py`
  Content:
  ```
  1 """A base class for databases to inherit from."""
  2 
  3 
  4 class Database():
  5     """A base database.
  6 
  7     Database classes are used to persist key/value pairs in a database.
  8 
  9     """
  10 
  11     def __init__(self, config):
  12         """Create the database.
  13 
  14         Set some basic properties from the database config such as the name
  15         of this database. It could also be a good place to setup properties
  16         to hold things like the database connection object and the database
  17         name.
  18 
  19         Args:
  20             config (dict): The config for this database specified in the
  21                            `configuration.yaml` file.
  22 
  23         """
  24         self.name = ""
  25         self.config = config
  26         self.client = None
  27         self.database = None
  28 
  29     async def connect(self, opsdroid):
  30         """Connect to database service and store the connection object.
  31 
  32         This method should connect to the given database using a native
  33         python library for that database. The library will most likely involve
  34         a connection object which will be used by the put and get methods.
  35         This object should be stored in self.
  36 
  37         Args:
  38             opsdroid (OpsDroid): An instance of the opsdroid core.
  39 
  40         """
  41         raise NotImplementedError
  42 
  43     async def disconnect(self):
  44         """Disconnect from the database.
  45 
  46         This method should disconnect from the given database using a native
  47         python library for that database.
  48 
  49         """
  50         pass
  51 
  52     async def put(self, key, data):
  53         """Store the data object in a database against the key.
  54 
  55         The data object will need to be serialised in a sensible way which
  56         suits the database being used and allows for reconstruction of the
  57         object.
  58 
  59         Args:
  60             key (string): The key to store the data object under.
  61             data (object): The data object to store.
  62 
  63         Returns:
  64             bool: True for data successfully stored, False otherwise.
  65 
  66         """
  67         raise NotImplementedError
  68 
  69     async def get(self, key):
  70         """Return a data object for a given key.
  71 
  72         Args:
  73             key (string): The key to lookup in the database.
  74 
  75         Returns:
  76             object or None: The data object stored for that key, or None if no
  77                             object found for that key.
  78 
  79         """
  80         raise NotImplementedError
  81
  ```
  --- 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()
  
  ```
  
golden_diff: diff --git a/opsdroid/database/__init__.py b/opsdroid/database/__init__.py
  --- a/opsdroid/database/__init__.py
  +++ b/opsdroid/database/__init__.py
  @@ -40,7 +40,7 @@
           """
           raise NotImplementedError
   
  -    async def disconnect(self):
  +    async def disconnect(self, opsdroid):
           """Disconnect from the database.
   
           This method should disconnect from the given database using a native
  
verification_info: {"golden_diff": "diff --git a/opsdroid/database/__init__.py b/opsdroid/database/__init__.py\n--- a/opsdroid/database/__init__.py\n+++ b/opsdroid/database/__init__.py\n@@ -40,7 +40,7 @@\n         \"\"\"\n         raise NotImplementedError\n \n-    async def disconnect(self):\n+    async def disconnect(self, opsdroid):\n         \"\"\"Disconnect from the database.\n \n         This method should disconnect from the given database using a native\n", "issue": "Cannot disconnect from SQLite\n<!-- Before you post an issue or if you are unsure about something join our gitter channel https://gitter.im/opsdroid/ and ask away! We are more than happy to help you. -->\r\n# Description\r\nSQLite database connector can\u2019t disconnect because of wrong method signature.\r\n\r\n## Steps to Reproduce\r\nEnable the SQLite database module, then try to shut down the bot.\r\n\r\n\r\n## Expected Functionality\r\nThe bot should shut down.\r\n\r\n## Experienced Functionality\r\nThis error message on the console, and the bot remains running (but with the connectors already disconnected).\r\n\r\n```\r\nERROR opsdroid.core: {'message': 'Task exception was never retrieved', 'exception': TypeError('disconnect() takes 1 positional argument but 2 were given',), 'future': <Task finished coro=<OpsDroid.handle_signal() done, defined at /home/polesz/.local/lib/python3.6/site-packages/opsdroid/core.py:121> exception=TypeError('disconnect() takes 1 positional argument but 2 were given',)>}\r\n```\r\n\r\n## Versions\r\n- **Opsdroid version:** 0.13.0\r\n- **Python version:** 3.6.6 (bundled with Fedora 28)\r\n- **OS/Docker version:** Fedora 28, no Docker involved\r\n\r\n## Additional information\r\nIt seems the method signature of `Database.disconnect()` is wrong (should be `async def disconnect(self, opsdroid)`) or the caller (`OpsDroid.unload()`) should not pass the `opsdroid` instance to `database.disconnect()` (personally i\u2019d vote for the former).\n", "before_files": [{"content": "\"\"\"A base class for databases to inherit from.\"\"\"\n\n\nclass Database():\n    \"\"\"A base database.\n\n    Database classes are used to persist key/value pairs in a database.\n\n    \"\"\"\n\n    def __init__(self, config):\n        \"\"\"Create the database.\n\n        Set some basic properties from the database config such as the name\n        of this database. It could also be a good place to setup properties\n        to hold things like the database connection object and the database\n        name.\n\n        Args:\n            config (dict): The config for this database specified in the\n                           `configuration.yaml` file.\n\n        \"\"\"\n        self.name = \"\"\n        self.config = config\n        self.client = None\n        self.database = None\n\n    async def connect(self, opsdroid):\n        \"\"\"Connect to database service and store the connection object.\n\n        This method should connect to the given database using a native\n        python library for that database. The library will most likely involve\n        a connection object which will be used by the put and get methods.\n        This object should be stored in self.\n\n        Args:\n            opsdroid (OpsDroid): An instance of the opsdroid core.\n\n        \"\"\"\n        raise NotImplementedError\n\n    async def disconnect(self):\n        \"\"\"Disconnect from the database.\n\n        This method should disconnect from the given database using a native\n        python library for that database.\n\n        \"\"\"\n        pass\n\n    async def put(self, key, data):\n        \"\"\"Store the data object in a database against the key.\n\n        The data object will need to be serialised in a sensible way which\n        suits the database being used and allows for reconstruction of the\n        object.\n\n        Args:\n            key (string): The key to store the data object under.\n            data (object): The data object to store.\n\n        Returns:\n            bool: True for data successfully stored, False otherwise.\n\n        \"\"\"\n        raise NotImplementedError\n\n    async def get(self, key):\n        \"\"\"Return a data object for a given key.\n\n        Args:\n            key (string): The key to lookup in the database.\n\n        Returns:\n            object or None: The data object stored for that key, or None if no\n                            object found for that key.\n\n        \"\"\"\n        raise NotImplementedError\n", "path": "opsdroid/database/__init__.py"}], "after_files": [{"content": "\"\"\"A base class for databases to inherit from.\"\"\"\n\n\nclass Database():\n    \"\"\"A base database.\n\n    Database classes are used to persist key/value pairs in a database.\n\n    \"\"\"\n\n    def __init__(self, config):\n        \"\"\"Create the database.\n\n        Set some basic properties from the database config such as the name\n        of this database. It could also be a good place to setup properties\n        to hold things like the database connection object and the database\n        name.\n\n        Args:\n            config (dict): The config for this database specified in the\n                           `configuration.yaml` file.\n\n        \"\"\"\n        self.name = \"\"\n        self.config = config\n        self.client = None\n        self.database = None\n\n    async def connect(self, opsdroid):\n        \"\"\"Connect to database service and store the connection object.\n\n        This method should connect to the given database using a native\n        python library for that database. The library will most likely involve\n        a connection object which will be used by the put and get methods.\n        This object should be stored in self.\n\n        Args:\n            opsdroid (OpsDroid): An instance of the opsdroid core.\n\n        \"\"\"\n        raise NotImplementedError\n\n    async def disconnect(self, opsdroid):\n        \"\"\"Disconnect from the database.\n\n        This method should disconnect from the given database using a native\n        python library for that database.\n\n        \"\"\"\n        pass\n\n    async def put(self, key, data):\n        \"\"\"Store the data object in a database against the key.\n\n        The data object will need to be serialised in a sensible way which\n        suits the database being used and allows for reconstruction of the\n        object.\n\n        Args:\n            key (string): The key to store the data object under.\n            data (object): The data object to store.\n\n        Returns:\n            bool: True for data successfully stored, False otherwise.\n\n        \"\"\"\n        raise NotImplementedError\n\n    async def get(self, key):\n        \"\"\"Return a data object for a given key.\n\n        Args:\n            key (string): The key to lookup in the database.\n\n        Returns:\n            object or None: The data object stored for that key, or None if no\n                            object found for that key.\n\n        \"\"\"\n        raise NotImplementedError\n", "path": "opsdroid/database/__init__.py"}]}