code: def _parse_chat(self, chat):
          
          if chat.data['type'] == 'chat':
              if chat.data['player'] in [p.player_name for i, p in self._players()]:
                  self._chat.append(chat.data)
          elif chat.data['type'] == 'ladder':
              self._ladder = chat.data['ladder']
          elif chat.data['type'] == 'rating':
              if chat.data['rating'] != 1600:
                  self._ratings[chat.data['player']] = chat.data['rating']
docs: Parse a chat message.