mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-17 10:53:39 +12:00
there must be an easier way to do this
This commit is contained in:
parent
36aaf1d771
commit
1fb9638917
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue