[Dungeon] No peeking

This commit is contained in:
aikaterna
2020-01-24 15:08:36 -08:00
committed by GitHub
parent ff8d3065d9
commit adfe2d04b0

View File

@@ -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: