collect attributes from self.__class__ instead of self

This prevents properties from being evaluated when collecting commands.