From c4dbbc2d1e1cb476581d0081a1c4f45bfbf4b8cc Mon Sep 17 00:00:00 2001 From: palmtree5 <3577255+palmtree5@users.noreply.github.com> Date: Wed, 14 Mar 2018 15:10:07 -0800 Subject: [PATCH] [V3 Warnings] Action list isn't a dict (fix #1382) (#1408) --- redbot/cogs/warnings/helpers.py | 4 ++-- redbot/cogs/warnings/warnings.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/redbot/cogs/warnings/helpers.py b/redbot/cogs/warnings/helpers.py index 699292823..051a5e8be 100644 --- a/redbot/cogs/warnings/helpers.py +++ b/redbot/cogs/warnings/helpers.py @@ -16,7 +16,7 @@ async def warning_points_add_check(config: Config, ctx: RedContext, user: discor guild_settings = config.guild(guild) act = {} async with guild_settings.actions() as registered_actions: - for a in registered_actions.keys(): + for a in registered_actions: if points >= registered_actions[a]["point_count"]: act = registered_actions[a] else: @@ -30,7 +30,7 @@ async def warning_points_remove_check(config: Config, ctx: RedContext, user: dis guild_settings = config.guild(guild) act = {} async with guild_settings.actions() as registered_actions: - for a in registered_actions.keys(): + for a in registered_actions: if points >= registered_actions[a]["point_count"]: act = registered_actions[a] else: diff --git a/redbot/cogs/warnings/warnings.py b/redbot/cogs/warnings/warnings.py index 0b3cd084a..953b5d59c 100644 --- a/redbot/cogs/warnings/warnings.py +++ b/redbot/cogs/warnings/warnings.py @@ -208,7 +208,7 @@ class Warnings: guild_settings = self.config.guild(guild) msg_list = [] async with guild_settings.actions() as registered_actions: - for r in registered_actions.keys(): + for r in registered_actions: msg_list.append( "Name: {}\nPoints: {}\nDescription: {}".format( r, r["points"], r["description"]