From 69c50591b286620c40f3bed2b0025ef6e0b9de19 Mon Sep 17 00:00:00 2001 From: palmtree5 <3577255+palmtree5@users.noreply.github.com> Date: Sun, 19 Nov 2017 14:47:30 -0900 Subject: [PATCH] [V3 Mod] Fix unban and case numbering problems (#1101) * [ModLog] fix case numbering issue * [Mod] fix unban command --- redbot/cogs/mod/mod.py | 2 +- redbot/core/modlog.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/redbot/cogs/mod/mod.py b/redbot/cogs/mod/mod.py index 1056aadbb..49d2f962b 100644 --- a/redbot/cogs/mod/mod.py +++ b/redbot/cogs/mod/mod.py @@ -522,7 +522,7 @@ class Mod: click the user and select 'Copy ID'.""" guild = ctx.guild author = ctx.author - user = self.bot.get_user_info(user_id) + user = await self.bot.get_user_info(user_id) if not user: await ctx.send(_("Couldn't find a user with that ID!")) return diff --git a/redbot/core/modlog.py b/redbot/core/modlog.py index 52e20bc94..fc0d7909e 100644 --- a/redbot/core/modlog.py +++ b/redbot/core/modlog.py @@ -311,6 +311,7 @@ async def get_next_case_number(guild: discord.Guild) -> str: """ cases = sorted( (await _conf.guild(guild).get_attr("cases")), + key=lambda x: int(x), reverse=True ) return str(int(cases[0]) + 1) if cases else "1"