async def is_user_authorized(self):
        """
        Returns ``True`` if the user is authorized.
        """
        if self._authorized is None:
            try:
                # Any request that requires authorization will work
                await self(functions.updates.GetStateRequest())
                self._authorized = True
            except errors.RPCError:
                self._authorized = False

        return self._authorized
async def is_user_authorized ( self ) : if self . _authorized is None : try : await self ( functions . updates . GetStateRequest ( ) ) self . _authorized = True except errors . RPCError : self . _authorized = False return self . _authorized
Returns ``True`` if the user is authorized.