Trying to init in a different way
This commit is contained in:
parent
4bd380a8a7
commit
e49609e316
@ -16,25 +16,25 @@ class ReginaldCog(commands.Cog, PermissionsMixin, BlacklistMixin, MemoryMixin):
|
|||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.config = Config.get_conf(self, identifier=71717171171717)
|
self.config = Config.get_conf(self, identifier=71717171171717)
|
||||||
self.default_listening_channel = 1085649787388428370 #
|
self.default_listening_channel = 1085649787388428370
|
||||||
self.memory_locks = {} # ✅ Prevents race conditions per channel
|
self.memory_locks = {}
|
||||||
|
|
||||||
# ✅ Properly Registered Configuration Keys
|
# Properly Registered Configuration Keys
|
||||||
default_global = {"openai_model": "gpt-4o-mini"}
|
default_global = {"openai_model": "gpt-4o-mini"}
|
||||||
default_guild = {
|
default_guild = {
|
||||||
"openai_api_key": None,
|
"openai_api_key": None,
|
||||||
"short_term_memory": {}, # Tracks last 100 messages per channel
|
"short_term_memory": {},
|
||||||
"mid_term_memory": {}, # Stores multiple condensed summaries
|
"mid_term_memory": {},
|
||||||
"long_term_profiles": {}, # Stores persistent knowledge
|
"long_term_profiles": {},
|
||||||
"admin_role": None,
|
"admin_role": None,
|
||||||
"listening_channel": None, # ✅ Stores the designated listening channel ID,
|
"listening_channel": None,
|
||||||
"allowed_roles": [], # ✅ List of roles that can access Reginald
|
"allowed_roles": [],
|
||||||
"blacklisted_users": [], # ✅ List of users who are explicitly denied access
|
"blacklisted_users": [],
|
||||||
}
|
}
|
||||||
self.config.register_global(**default_global)
|
self.config.register_global(**default_global)
|
||||||
self.config.register_guild(**default_guild)
|
self.config.register_guild(**default_guild)
|
||||||
|
|
||||||
MemoryMixin.__init__(self, self.config)
|
super().__init__(self.config) #Trying to initialize MemoryMixin
|
||||||
|
|
||||||
async def is_admin(self, ctx):
|
async def is_admin(self, ctx):
|
||||||
admin_role_id = await self.config.guild(ctx.guild).admin_role()
|
admin_role_id = await self.config.guild(ctx.guild).admin_role()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user