mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 09:52:30 -05:00
[V3 Config] Fix unloading and implement singleton driver (#1458)
* Add the identifier as an initialization parameter * Remove config object singleton and opt for a shared JSON datastore * Fix bot unloading to deal with memory leaks * Fix tests * Fix clear all bug
This commit is contained in:
@@ -2,9 +2,9 @@ __all__ = ["BaseDriver"]
|
||||
|
||||
|
||||
class BaseDriver:
|
||||
def __init__(self, cog_name):
|
||||
def __init__(self, cog_name, identifier):
|
||||
self.cog_name = cog_name
|
||||
self.unique_cog_identifier = None # This is set by Config's init method
|
||||
self.unique_cog_identifier = identifier
|
||||
|
||||
async def get(self, *identifiers: str):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user