Repository: Cog-Creators/Red-DiscordBot

Issue:
[V3/Config] Set data folder for config 
Please be sure to read through other issues as well to make sure what you are suggesting/reporting has not already
been suggested/reported

### Type:

- [x] Suggestion
- [ ] Bug

### Brief description of the problem
Currently, it's difficult to set a specific data folder for config. The use of self works fine in most cases, but it does not play well with multiple or single inheritance. If you try to do this, you will end up having multiple data folders, each having a different copy of the operations you have performed. See code in `steps to reproduce` It would be great if we could have another way of setting the main "data" folder for our cogs.
### Expected behavior
One centralized data folder.
### Actual behavior
Splits the data into separate folders.

### Steps to reproduce
The following hastebin links to code that shows the problem:    
https://hastebin.com/utetigekup.py

The work around provided by @Tobotimus uses a named tuple to bypass the issue.     
https://hastebin.com/favisiselo.py




Discussion:

Resolving patch:
diff --git a/redbot/core/config.py b/redbot/core/config.py
--- a/redbot/core/config.py
+++ b/redbot/core/config.py
@@ -509,7 +509,7 @@ def defaults(self):
 
     @classmethod
     def get_conf(cls, cog_instance, identifier: int,
-                 force_registration=False):
+                 force_registration=False, cog_name=None):
         """Get a Config instance for your cog.
 
         Parameters
@@ -524,6 +524,10 @@ def get_conf(cls, cog_instance, identifier: int,
         force_registration : `bool`, optional
             Should config require registration of data keys before allowing you
             to get/set values? See `force_registration`.
+        cog_name : str, optional
+            Config normally uses ``cog_instance`` to determine tha name of your cog.
+            If you wish you may pass ``None`` to ``cog_instance`` and directly specify
+            the name of your cog here.
 
         Returns
         -------
@@ -531,7 +535,11 @@ def get_conf(cls, cog_instance, identifier: int,
             A new Config object.
 
         """
-        cog_path_override = cog_data_path(cog_instance)
+        if cog_instance is None and not cog_name is None:
+            cog_path_override = cog_data_path(raw_name=cog_name)
+        else:
+            cog_path_override = cog_data_path(cog_instance=cog_instance)
+
         cog_name = cog_path_override.stem
         uuid = str(hash(identifier))
 
diff --git a/redbot/core/data_manager.py b/redbot/core/data_manager.py
--- a/redbot/core/data_manager.py
+++ b/redbot/core/data_manager.py
@@ -80,15 +80,19 @@ def _base_data_path() -> Path:
     return Path(path).resolve()
 
 
-def cog_data_path(cog_instance=None) -> Path:
+def cog_data_path(cog_instance=None, raw_name: str=None) -> Path:
     """Gets the base cog data path. If you want to get the folder with
     which to store your own cog's data please pass in an instance
     of your cog class.
 
+    Either ``cog_instance`` or ``raw_name`` will be used, not both.
+
     Parameters
     ----------
     cog_instance
         The instance of the cog you wish to get a data path for.
+    raw_name : str
+        The name of the cog to get a data path for.
 
     Returns
     -------
@@ -103,7 +107,10 @@ def cog_data_path(cog_instance=None) -> Path:
         raise RuntimeError("You must load the basic config before you"
                            " can get the cog data path.") from e
     cog_path = base_data_path / basic_config['COG_PATH_APPEND']
-    if cog_instance:
+
+    if raw_name is not None:
+        cog_path = cog_path / raw_name
+    elif cog_instance is not None:
         cog_path = cog_path / cog_instance.__class__.__name__
     cog_path.mkdir(exist_ok=True, parents=True)
 


Test patch: