code: def add_exception_type(self, exc):
          r
  
          if not inspect.isclass(exc):
              raise TypeError('{0!r} must be a class.'.format(exc))
          if not issubclass(exc, BaseException):
              raise TypeError('{0!r} must inherit from BaseException.'.format(exc))
  
          self._valid_exception = (*self._valid_exception, exc)
docs: r"""Adds an exception type to be handled during the reconnect logic.
  
          By default the exception types handled are those handled by
          :meth:`discord.Client.connect`\, which includes a lot of internet disconnection
          errors.
  
          This function is useful if you're interacting with a 3rd party library that
          raises its own set of exceptions.
  
          Parameters
          ------------
          exc: Type[:class:`BaseException`]
              The exception class to handle.
  
          Raises
          --------
          TypeError
              The exception passed is either not a class or not inherited from :class:`BaseException`.