mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 18:02:31 -05:00
[Config] Asynchronous getters (#907)
* Make config get async * Asyncify alias * Asyncify bank * Asyncify cog manager * IT BOOTS * Asyncify core commands * Asyncify repo manager * Asyncify downloader * Asyncify economy * Asyncify alias TESTS * Asyncify economy TESTS * Asyncify downloader TESTS * Asyncify config TESTS * A bank thing * Asyncify Bank cog * Warning message in docs * Update docs with await syntax * Update docs with await syntax
This commit is contained in:
@@ -5,7 +5,7 @@ class BaseDriver:
|
||||
def get_driver(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def get(self, identifiers: Tuple[str]):
|
||||
async def get(self, identifiers: Tuple[str]):
|
||||
raise NotImplementedError
|
||||
|
||||
async def set(self, identifiers: Tuple[str], value):
|
||||
|
||||
@@ -32,7 +32,7 @@ class JSON(BaseDriver):
|
||||
def get_driver(self):
|
||||
return self
|
||||
|
||||
def get(self, identifiers: Tuple[str]):
|
||||
async def get(self, identifiers: Tuple[str]):
|
||||
partial = self.data
|
||||
for i in identifiers:
|
||||
partial = partial[i]
|
||||
|
||||
Reference in New Issue
Block a user