Fix whois to use proper member casting & allow mention prefix

pull/64/head
Stijn De Clercq 2021-05-30 14:38:56 +02:00
parent a06fcdefe0
commit 10da82d211
1 changed files with 1 additions and 6 deletions

View File

@ -176,12 +176,7 @@ class ModCommands(commands.Cog):
@commands.command(name="WhoIs", aliases=["Info", "Whodis"], usage="[@User]") @commands.command(name="WhoIs", aliases=["Info", "Whodis"], usage="[@User]")
@help.Category(Category.Mod) @help.Category(Category.Mod)
async def whois(self, ctx, user): async def whois(self, ctx, user: discord.User = None):
if ctx.message.mentions:
user = ctx.message.mentions[0].id
user = await self.client.fetch_user(int(user))
if user is None: if user is None:
return return