Fix issue with entering admin into unban database
This commit is contained in:
parent
30dae009cc
commit
31b844a78f
1 changed files with 4 additions and 3 deletions
|
@ -190,11 +190,12 @@ class AdminCog(commands.Cog):
|
|||
user, discrim = user.split("#")
|
||||
if discrim:
|
||||
discord_ban_info = find(
|
||||
lambda x: x.name == user and x.discriminator == discrim,
|
||||
lambda x: x.user.name == user
|
||||
and x.user.discriminator == discrim,
|
||||
bans,
|
||||
)
|
||||
else:
|
||||
results = filter(lambda x: x.name == user, bans)
|
||||
results = filter(lambda x: x.user.name == user, bans)
|
||||
if results:
|
||||
if len(results) > 1:
|
||||
# TODO: send list of bans that matched
|
||||
|
@ -245,7 +246,7 @@ class AdminCog(commands.Cog):
|
|||
"username": database_ban_info["username"],
|
||||
"discrim": database_ban_info["discrim"],
|
||||
"guild": ctx.guild.id,
|
||||
"admin": ctx.author,
|
||||
"admin": ctx.author.id,
|
||||
"reason": reason,
|
||||
"time": datetime.now(),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue