mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
[V3 Config] Record custom group information using cog_add event (#2550)
* Do things differently * Uncomment critical lines * Reduce, reuse, recycle * Check groups on all new config objects after a cog loads * I don't know why this is failing now or why we need the global keyword * gotta fix this too
This commit is contained in:
@@ -18,6 +18,8 @@ from .help_formatter import Help, help as help_
|
||||
from .rpc import RPCMixin
|
||||
from .utils import common_filters
|
||||
|
||||
CUSTOM_GROUPS = "CUSTOM_GROUPS"
|
||||
|
||||
|
||||
def _is_submodule(parent, child):
|
||||
return parent == child or child.startswith(parent + ".")
|
||||
@@ -74,6 +76,9 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin):
|
||||
|
||||
self.db.register_user(embeds=None)
|
||||
|
||||
self.db.init_custom(CUSTOM_GROUPS, 2)
|
||||
self.db.register_custom(CUSTOM_GROUPS)
|
||||
|
||||
async def prefix_manager(bot, message):
|
||||
if not cli_flags.prefix:
|
||||
global_prefix = await bot.db.prefix()
|
||||
|
||||
Reference in New Issue
Block a user