From adfe2d04b0f8baa9e4960450d439a67389444bb5 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Fri, 24 Jan 2020 15:08:36 -0800 Subject: [PATCH] [Dungeon] No peeking --- dungeon/dungeon.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dungeon/dungeon.py b/dungeon/dungeon.py index f67dc40..69455e7 100644 --- a/dungeon/dungeon.py +++ b/dungeon/dungeon.py @@ -206,7 +206,10 @@ class Dungeon(commands.Cog): dm_message = data["dm_message"] if blacklist: - async with self.bot.db.blacklist() as blacklist_list: + # if you are reading this to learn, DON'T do this, there will be a real way + # to interact with bot-owned data without touching config directly at some + # point in the future after Red 3.2 + async with self.bot._config.blacklist() as blacklist_list: if user.id in blacklist_list: blacklist_list.remove(user.id) @@ -427,7 +430,10 @@ class Dungeon(commands.Cog): ) if blacklist: - async with self.bot.db.blacklist() as blacklist_list: + # if you are reading this to learn, DON'T do this, there will be a real way + # to interact with bot-owned data without touching config directly at some + # point in the future after Red 3.2 + async with self.bot._config.blacklist() as blacklist_list: if member.id not in blacklist_list: blacklist_list.append(member.id) try: