@classmethod
    def delayed_restart(cls,minutes, message=""):
        """Delayed restart of the server

        Will restart the server after 5,10,30,60 minutes.
        Notifies the server with broadcast on all these intervals and on 60 seconds

        Args:
            minutes: 5,10,30,60 minutes.

        Returns:
            Result: Bool
            Err: String / None
        """

        minutes = int(minutes)

        if [5,10,30,60] not in minutes:
            err = 'Unable to do delayed restart. Valid waiting times: 5, 10, 30, 60'
            out(err)
            return False, err


        def delayed_message(minutes,message=""):
            if minutes == 60:
                cls.broadcast(Lang.get('restart_default').format('60 minutes',message), cls.response_callback_response_only)
                time.sleep(30*60)
                minutes = 30

            if minutes == 30:
                cls.broadcast(Lang.get('restart_default').format('30 minutes',message), cls.response_callback_response_only)
                time.sleep(20*60)
                minutes = 10

            if minutes == 10:
                cls.broadcast(Lang.get('restart_default').format('10 minutes',message), cls.response_callback_response_only)
                time.sleep(5*60)

            cls.broadcast(Lang.get('restart_default').format('5 minutes',message), cls.response_callback_response_only)
            time.sleep(4*60)

            cls.broadcast(Lang.get('restart_default').format('60 seconds',message), cls.response_callback_response_only)
            time.sleep(50)

            cls.broadcast(Lang.get('restart_default').format('10 seconds',message), cls.response_callback_response_only)
            time.sleep(10)

            Storage.restart_timestamp = None
            ServerControl.restart_server()


        Storage.restart_timestamp = floor(time.time() + (minutes*60))
        callback = lambda:delayed_message(minutes,message)
        ThreadHandler.create_thread(callback,looping=False)
        return True, None
dataset/ETHPy150Open f4ble/pyarc/ark/rcon.py/Rcon.delayed_restart/swapped operands of `not in`