mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 17:32:31 -05:00
[Core] Removed flusher, helpers now save on changes
After some considerations, while the flusher was an interesting experiment, it doesn't seem to be reliable enough. It's been removed in favor of the helpers autosaving on any change in a threadsafe way.
This commit is contained in:
@@ -65,12 +65,12 @@ class Red(commands.Bot):
|
||||
"""Lists packages present in the cogs the folder"""
|
||||
return os.listdir("cogs")
|
||||
|
||||
def save_packages_status(self):
|
||||
async def save_packages_status(self):
|
||||
loaded = []
|
||||
for package in self.extensions:
|
||||
if package.startswith("cogs."):
|
||||
loaded.append(package)
|
||||
self.db.set_global("packages", loaded)
|
||||
await self.db.set_global("packages", loaded)
|
||||
|
||||
|
||||
class ExitCodes(Enum):
|
||||
|
||||
Reference in New Issue
Block a user