[V3 Mod] Fix unban and case numbering problems (#1101)

* [ModLog] fix case numbering issue

* [Mod] fix unban command
This commit is contained in:
palmtree5 2017-11-19 14:47:30 -09:00 committed by Will
parent 02d3aec33e
commit 69c50591b2
2 changed files with 2 additions and 1 deletions

View File

@ -522,7 +522,7 @@ class Mod:
click the user and select 'Copy ID'.""" click the user and select 'Copy ID'."""
guild = ctx.guild guild = ctx.guild
author = ctx.author author = ctx.author
user = self.bot.get_user_info(user_id) user = await self.bot.get_user_info(user_id)
if not user: if not user:
await ctx.send(_("Couldn't find a user with that ID!")) await ctx.send(_("Couldn't find a user with that ID!"))
return return

View File

@ -311,6 +311,7 @@ async def get_next_case_number(guild: discord.Guild) -> str:
""" """
cases = sorted( cases = sorted(
(await _conf.guild(guild).get_attr("cases")), (await _conf.guild(guild).get_attr("cases")),
key=lambda x: int(x),
reverse=True reverse=True
) )
return str(int(cases[0]) + 1) if cases else "1" return str(int(cases[0]) + 1) if cases else "1"