From c7ea0e4d5e1eb961016faf9b18e0dbbdbe7e31a3 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 6 Aug 2020 13:24:08 -0400 Subject: [PATCH] Updated to delete data correctly --- flag/flag.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flag/flag.py b/flag/flag.py index d1e34fb..3073761 100644 --- a/flag/flag.py +++ b/flag/flag.py @@ -33,11 +33,11 @@ class Flag(Cog): if requester not in ["discord_deleted_user", "owner"]: return - all_members = await self.config.all_members() + all_guilds = await self.config.all_guilds() - async for guild_id, guild_data in AsyncIter(all_members.items(), steps=100): - if user_id in guild_data: - await self.config.member_from_ids(guild_id, user_id).clear() + async for guild_id, guild_data in AsyncIter(all_guilds.items(), steps=100): + if user_id in guild_data["flags"]: + await self.config.guild_from_id(guild_id).flags.clear_raw(user_id) @checks.is_owner() @commands.guild_only()