1@client.command()
2async def unban(ctx, *, member):
3 banned_users = await ctx.guild.bans()
4
5 member_name, member_discriminator = member.split('#')
6 for ban_entry in banned_users:
7 user = ban_entry.user
8
9 if (user.name, user.discriminator) == (member_name, member_discriminator):
10 await ctx.guild.unban(user)
11 await ctx.channel.send(f"Unbanned: {user.mention}")
1@client.command()
2async def unban(ctx, *,member):
3 banned_user = await ctx.guild.bans()
4
5 member_name, member_discriminator = member.split('#')
6 for ban_entry in banned_users:
7 user = ban_entry.user
8
9 if (user.name, user.discriminator) == (member_name, member_discriminator):
10 await ctx.guild.unban(user)
11 await ctx.send(f'Unbanned {user.mention}')