From 1fb9638917ad9a798427b8b8e2f8da6b56178622 Mon Sep 17 00:00:00 2001 From: brandons209 Date: Tue, 11 Feb 2020 01:10:52 -0500 Subject: [PATCH] there must be an easier way to do this --- roleplay/roleplay.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roleplay/roleplay.py b/roleplay/roleplay.py index aa9227c..1fdf151 100644 --- a/roleplay/roleplay.py +++ b/roleplay/roleplay.py @@ -65,8 +65,9 @@ class RolePlay(commands.Cog): target = target.strip() user = None intensity = 1 + # mentions can be <@! or <@ # user is mentioned w/ no intensity - if "<@" == target[:3] and ">" == target[-1]: + if "<@" == target[:2] and ">" == target[-1]: user = guild.get_member(int(target[3:-1])) # try with no intensity specified and not a mention @@ -83,7 +84,7 @@ class RolePlay(commands.Cog): user = guild.get_member_named(name) # parse mention if not user: - if "<@" == name[:3] and ">" == name[-1]: + if "<@" == name[:2] and ">" == name[-1]: user = guild.get_member(int(name[3:-1])) except: pass