code: async def on_raw_part(self, message):
          
          nick, metadata = self._parse_user(message.source)
          channels = message.params[0].split(',')
          if len(message.params) > 1:
              reason = message.params[1]
          else:
              reason = None
  
          self._sync_user(nick, metadata)
          if self.is_same_nick(self.nickname, nick):
              # We left the channel. Remove from channel list. :(
              for channel in channels:
                  if self.in_channel(channel):
                      self._destroy_channel(channel)
                      await self.on_part(channel, nick, reason)
          else:
              # Someone else left. Remove them.
              for channel in channels:
                  self._destroy_user(nick, channel)
                  await self.on_part(channel, nick, reason)
docs: PART command.