junepark678 / GIRRewrite

Use items() to iterate over a dictionary PTC-W0011
Anti-pattern
Major
a year agoa year old
Consider using reaction_mapping.items() to iterate over the dictionary
163        view = discord.ui.View(timeout=None)
164        resulting_reactions_list = ""
165        async with ctx.channel.typing():
166            for r in reaction_mapping:167                resulting_reactions_list += f"Reaction {r} will give role <@&{reaction_mapping[r]}>\n"
168                view.add_item(ReactionRoleButton(
169                    ctx.guild.get_role(reaction_mapping[r]), r))