From cc9ba3d641d055260751dab553ecf0616472de60 Mon Sep 17 00:00:00 2001 From: Andrei Date: Sun, 13 Nov 2016 04:57:16 -0600 Subject: [PATCH] bugfix - user type should look in state if its not a mention resolver --- disco/bot/command.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/disco/bot/command.py b/disco/bot/command.py index 6eb7cc4..3471af8 100644 --- a/disco/bot/command.py +++ b/disco/bot/command.py @@ -147,9 +147,12 @@ class Command(object): def resolve_user(ctx, uid): if isinstance(uid, int): - return ctx.msg.mentions.get(uid) + if uid in ctx.msg.mentions: + return ctx.msg.mentions.get(uid) + else: + return ctx.msg.client.state.users.get(uid) else: - return ctx.msg.mentions.select_one(username=uid[0], discriminator=uid[1]) + return ctx.msg.client.state.users.select_one(username=uid[0], discriminator=uid[1]) def resolve_channel(ctx, cid): return ctx.msg.guild.channels.get(cid)