fix(aurora): fixed random handle_expiry error
This commit is contained in:
parent
0e2d69f106
commit
497c287019
2 changed files with 5 additions and 4 deletions
|
@ -68,10 +68,10 @@ class Aurora(commands.Cog):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
register_config(config)
|
register_config(config)
|
||||||
disable_dateutil()
|
disable_dateutil()
|
||||||
self.handle_expiry.start() # pylint: disable=no-member
|
|
||||||
|
|
||||||
async def cog_load(self):
|
async def cog_load(self):
|
||||||
"""This method prepares the database schema for all of the guilds the bot is currently in."""
|
"""This method prepares the database schema for all of the guilds the bot is currently in, and starts the handle_expiry task."""
|
||||||
|
await self.handle_expiry.start() # pylint: disable=no-member
|
||||||
guilds: list[discord.Guild] = self.bot.guilds
|
guilds: list[discord.Guild] = self.bot.guilds
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -83,7 +83,7 @@ class Aurora(commands.Cog):
|
||||||
return
|
return
|
||||||
|
|
||||||
async def cog_unload(self):
|
async def cog_unload(self):
|
||||||
self.handle_expiry.cancel() # pylint: disable=no-member
|
await self.handle_expiry.cancel() # pylint: disable=no-member
|
||||||
|
|
||||||
@commands.Cog.listener('on_guild_join')
|
@commands.Cog.listener('on_guild_join')
|
||||||
async def db_generate_guild_join(self, guild: discord.Guild):
|
async def db_generate_guild_join(self, guild: discord.Guild):
|
||||||
|
|
|
@ -20,6 +20,7 @@ async def embed_factory(embed_type: str, color: Color, /, interaction: Interact
|
||||||
- 'changes'
|
- 'changes'
|
||||||
|
|
||||||
Required arguments for 'message':
|
Required arguments for 'message':
|
||||||
|
- color
|
||||||
- guild
|
- guild
|
||||||
- reason
|
- reason
|
||||||
- moderation_type
|
- moderation_type
|
||||||
|
|
Loading…
Reference in a new issue