mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
[Mod] Only loop through guilds in config when checking tempbans (#4907)
* [Mod] No longer loop through all guilds on check_tempban_expirations. * Address Jack's review. * I don't think this comment actually served any purpose * Split this into more methods * Small optimization for cases where the guild tempbans weren't updated * Blackify Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -80,7 +80,7 @@ class Mod(
|
||||
self.config.register_member(**self.default_member_settings)
|
||||
self.config.register_user(**self.default_user_settings)
|
||||
self.cache: dict = {}
|
||||
self.tban_expiry_task = self.bot.loop.create_task(self.check_tempban_expirations())
|
||||
self.tban_expiry_task = asyncio.create_task(self.tempban_expirations_task())
|
||||
self.last_case: dict = defaultdict(dict)
|
||||
|
||||
self._ready = asyncio.Event()
|
||||
|
||||
Reference in New Issue
Block a user