original_docstring: Start the auto lockdown procedure.
docstring: Start the auto lockdown procedure.
docstring_tokens: Start the auto lockdown procedure .
code: async def _auto_lockdown(self, triggering_member):
          """Start the auto lockdown procedure."""
          # triggering_member is the user that joined that ended up causing the
          # ratelimiter to go off. now we have to remove this user...
          await self.bounce(triggering_member, "Users are joining too quickly")
  
          # ...and the rest of the users who were part of the join burst.
          #
          # we explicitly filter out the triggering member because if they joined
          # more than once to trigger the ratelimit, they would appear in this
          # list.
          accompanying = [
              member
              for member in self.recent_joins[-self.join_ratelimiter.rate :]
              if member != triggering_member
          ]
  
          self.log.debug("_auto_lockdown: triggering_member: %r", triggering_member)
          self.log.debug("_auto_lockdown: accompanying: %r", accompanying)
  
          if accompanying:
              for member in accompanying:
                  await self.bounce(member, "Users are joining too quickly")
  
          # empty out the recent joins list
          self.recent_joins = []
  
          checks = self.config.get("checks", {})
          block_all_check = checks.get("block_all", {})
          is_blocking_all = block_all_check.get("enabled", False)
  
          # now prevent anyone else from joining by enabling block_all
          if not is_blocking_all:
              self.log.debug("performing automatic lockdown")
              await self._lockdown()
          else:
              self.log.debug("already blocking all, skipping lockdown")
code_tokens: async def _auto_lockdown ( self , triggering_member ) : await self . bounce ( triggering_member , "Users are joining too quickly" ) accompanying = [ member for member in self . recent_joins [ - self . join_ratelimiter . rate : ] if member != triggering_member ] self . log . debug ( "_auto_lockdown: triggering_member: %r" , triggering_member ) self . log . debug ( "_auto_lockdown: accompanying: %r" , accompanying ) if accompanying : for member in accompanying : await self . bounce ( member , "Users are joining too quickly" ) self . recent_joins = [ ] checks = self . config . get ( "checks" , { } ) block_all_check = checks . get ( "block_all" , { } ) is_blocking_all = block_all_check . get ( "enabled" , False ) if not is_blocking_all : self . log . debug ( "performing automatic lockdown" ) await self . _lockdown ( ) else : self . log . debug ( "already blocking all, skipping lockdown" )
short_docstring: Start the auto lockdown procedure.
short_docstring_tokens: Start the auto lockdown procedure .
comment: """Start the auto lockdown procedure."""$SEP$# triggering_member is the user that joined that ended up causing the$SEP$# ratelimiter to go off. now we have to remove this user...$SEP$# ...and the rest of the users who were part of the join burst.$SEP$#$SEP$# we explicitly filter out the triggering member because if they joined$SEP$# more than once to trigger the ratelimit, they would appear in this$SEP$# list.$SEP$# empty out the recent joins list$SEP$# now prevent anyone else from joining by enabling block_all