there must be an easier way to do this

This commit is contained in:
brandons209 2020-02-11 01:10:52 -05:00
parent 36aaf1d771
commit 1fb9638917

View file

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