Skip to content

Commit

Permalink
Use config.all_guilds for loading automod
Browse files Browse the repository at this point in the history
Resolves #150
  • Loading branch information
laggron42 committed Mar 3, 2021
1 parent 493377f commit a2e3368
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions warnsystem/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def __init__(self, bot: Red, config: Config):
self.automod_regex = {}

async def init_automod_enabled(self):
for guild in self.bot.guilds:
if await self.data.guild(guild).automod.enabled():
self.automod_enabled.append(guild.id)
for guild_id, data in (await self.data.all_guilds()).items():
if data["automod"]["enabled"] is True:
self.automod_enabled.append(guild_id)

async def _debug_info(self) -> str:
"""
Expand Down
2 changes: 1 addition & 1 deletion warnsystem/warnsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def __init__(self, bot):

self.task: asyncio.Task

__version__ = "1.3.13"
__version__ = "1.3.14"
__author__ = ["retke (El Laggron)"]

# helpers
Expand Down

0 comments on commit a2e3368

Please sign in to comment.