mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Mod] Use list.copy() for tempban expirations (#2166)
Fixes an error left behind from #2161 (modifying a list while iterating over it)
This commit is contained in:
parent
d5899fae83
commit
54dad2a604
@ -1397,7 +1397,7 @@ class Mod(commands.Cog):
|
|||||||
while self == self.bot.get_cog("Mod"):
|
while self == self.bot.get_cog("Mod"):
|
||||||
for guild in self.bot.guilds:
|
for guild in self.bot.guilds:
|
||||||
async with self.settings.guild(guild).current_tempbans() as guild_tempbans:
|
async with self.settings.guild(guild).current_tempbans() as guild_tempbans:
|
||||||
for uid in guild_tempbans:
|
for uid in guild_tempbans.copy():
|
||||||
unban_time = datetime.utcfromtimestamp(
|
unban_time = datetime.utcfromtimestamp(
|
||||||
await self.settings.member(member(uid, guild)).banned_until()
|
await self.settings.member(member(uid, guild)).banned_until()
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user