[Core] Implemented missing checks, extended DB

The DB has been extended and now covers the functionality of the old Settings class of the previous version
This commit is contained in:
Twentysix
2017-04-30 00:28:56 +02:00
parent 9fc4e54ece
commit ba9d4b7f0f
4 changed files with 149 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
from discord.ext import commands
from collections import Counter
from core.utils.helpers import JsonGuildDB
from core.settings import CoreDB
from enum import Enum
import os
@@ -8,9 +8,9 @@ import os
class Red(commands.Bot):
def __init__(self, cli_flags, **kwargs):
self._shutdown_mode = ExitCodes.CRITICAL
self.db = JsonGuildDB("core/data/settings.json",
autosave=True,
create_dirs=True)
self.db = CoreDB("core/data/settings.json",
autosave=True,
create_dirs=True)
def prefix_manager(bot, message):
global_prefix = self.db.get_global("prefix", [])