Skip to content

Commit

Permalink
fix blocklist migration detection
Browse files Browse the repository at this point in the history
  • Loading branch information
khakers committed Jul 23, 2023
1 parent 6a9e024 commit a7ff946
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,6 @@ def startup(self):
logger.line()
logger.info("discord.py: v%s", discord.__version__)
logger.line()
if not self.config["blocked"] or not self.config["blocked_roles"]:
logger.warning(
"Un-migrated blocklists found. Please run the '[p]migrate blocklist' command after backing "
"up your config/database. Blocklist functionality will be disabled until this is done."
)

async def load_extensions(self):
for cog in self.loaded_cogs:
Expand Down Expand Up @@ -581,6 +576,13 @@ async def on_ready(self):
)
logger.line()

if len(self.config["blocked"]) > 0 or len(self.config["blocked_roles"]) > 0:
logger.warning(
"Un-migrated blocklists found. Please run the '[p]migrate blocklist' command after backing "
"up your config/database. Blocklist functionality will be disabled until this is done."
)
logger.line()

await self.threads.populate_cache()

# closures
Expand Down

0 comments on commit a7ff946

Please sign in to comment.