mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 01:42:30 -05:00
[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:
@@ -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", [])
|
||||
|
||||
Reference in New Issue
Block a user