From ae3ecb3ac46d90ebab1cb556fdc357848f45abb5 Mon Sep 17 00:00:00 2001 From: ToxicKidz <78174417+ToxicKidz@users.noreply.github.com> Date: Fri, 7 May 2021 13:47:43 -0400 Subject: chore: Simplify the if statement Co-authored-by: Anand Krishna <40204976+anand2312@users.noreply.github.com> --- bot/exts/valentines/be_my_valentine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot') diff --git a/bot/exts/valentines/be_my_valentine.py b/bot/exts/valentines/be_my_valentine.py index 1ce92203..b9cf6738 100644 --- a/bot/exts/valentines/be_my_valentine.py +++ b/bot/exts/valentines/be_my_valentine.py @@ -51,7 +51,7 @@ class BeMyValentine(commands.Cog): """Adds the lovefest role.""" user = ctx.author role = ctx.guild.get_role(Lovefest.role_id) - if Lovefest.role_id not in [role.id for role in ctx.message.author.roles]: + if role not in ctx.author.roles: await user.add_roles(role) await ctx.send("The Lovefest role has been added !") else: -- cgit v1.2.3