Skip to content

Commit 7cff28e

Browse files
committed
feat(db): Add AsyncDatabase instance and backward compatibility alias
1 parent b5da6c1 commit 7cff28e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

utils/db.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,3 +1837,9 @@ def get_stats(self, guild_id: int):
18371837
except Exception as e:
18381838
self.logger.error(f"Error getting stats: {e}")
18391839
return {}
1840+
1841+
# Create an instance of AsyncDatabase to be imported elsewhere
1842+
async_db = AsyncDatabase.get_instance()
1843+
1844+
# Add a 'db' alias for backward compatibility
1845+
db = async_db

0 commit comments

Comments
 (0)