code: async def on_raw_cap_ls(self, params):
          
          to_request = set()
  
          for capab in params[0].split():
              capab, value = self._capability_normalize(capab)
  
              # Only process new capabilities.
              if capab in self._capabilities:
                  continue
  
              # Check if we support the capability.
              attr = 'on_capability_' + pydle.protocol.identifierify(capab) + '_available'
              supported = (await getattr(self, attr)(value)) if hasattr(self, attr) else False
  
              if supported:
                  if isinstance(supported, str):
                      to_request.add(capab + CAPABILITY_VALUE_DIVIDER + supported)
                  else:
                      to_request.add(capab)
              else:
                  self._capabilities[capab] = False
  
          if to_request:
              # Request some capabilities.
              self._capabilities_requested.update(x.split(CAPABILITY_VALUE_DIVIDER, 1)[0] for x in to_request)
              await self.rawmsg('CAP', 'REQ', ' '.join(to_request))
          else:
              # No capabilities requested, end negotiation.
              await self.rawmsg('CAP', 'END')
docs: Update capability mapping. Request capabilities.