original_docstring: Shows a reaction prompt to reverse a ban.
  
          This is only called on ban notice messages to let moderators reverse an
          automatic ban.
          
docstring: Shows a reaction prompt to reverse a ban.
  This is only called on ban notice messages to let moderators reverse an
  automatic ban.
docstring_tokens: Shows a reaction prompt to reverse a ban . This is only called on ban notice messages to let moderators reverse an automatic ban .
code: async def _ban_reverse_prompt(
          self, message: discord.Message, banned: discord.Member
      ):
          """Shows a reaction prompt to reverse a ban.
  
          This is only called on ban notice messages to let moderators reverse an
          automatic ban.
          """
          unban_emoji = self.bot.emoji("gatekeeper.unban")
          await message.add_reaction(unban_emoji)
  
          def check(reaction, member):
              if not isinstance(member, discord.Member) or member.bot:
                  return False
              can_ban = member.guild_permissions.ban_members
              return (
                  reaction.message.id == message.id
                  and reaction.emoji == unban_emoji
                  and can_ban
              )
  
          _reaction, user = await self.bot.wait_for("reaction_add", check=check)
  
          try:
              await banned.unban(
                  reason=f"Gatekeeper: Ban was reversed by {represent(user)}"
              )
          except discord.HTTPException as error:
              await self.report(
                  f"Cannot reverse the ban of {represent(banned)}: `{error}`"
              )
          else:
              await self.report(
                  f"The ban of {represent(banned)} was reversed by {represent(user)}."
              )
code_tokens: async def _ban_reverse_prompt ( self , message : discord . Message , banned : discord . Member ) : unban_emoji = self . bot . emoji ( "gatekeeper.unban" ) await message . add_reaction ( unban_emoji ) def check ( reaction , member ) : if not isinstance ( member , discord . Member ) or member . bot : return False can_ban = member . guild_permissions . ban_members return ( reaction . message . id == message . id and reaction . emoji == unban_emoji and can_ban ) _reaction , user = await self . bot . wait_for ( "reaction_add" , check = check ) try : await banned . unban ( reason = f"Gatekeeper: Ban was reversed by {represent(user)}" ) except discord . HTTPException as error : await self . report ( f"Cannot reverse the ban of {represent(banned)}: `{error}`" ) else : await self . report ( f"The ban of {represent(banned)} was reversed by {represent(user)}." )
short_docstring: Shows a reaction prompt to reverse a ban.
short_docstring_tokens: Shows a reaction prompt to reverse a ban .
comment: """Shows a reaction prompt to reverse a ban.
  
          This is only called on ban notice messages to let moderators reverse an
          automatic ban.
          """