diff --git a/utils/misc.py b/utils/misc.py index c625309..76bd6f3 100644 --- a/utils/misc.py +++ b/utils/misc.py @@ -19,6 +19,6 @@ class Update: @staticmethod def restart_bot(): - if sys.argv[1] == 'restart': + if len(sys.argv >= 2) and sys.argv[1] == 'restart': return os.execvp(sys.executable, [sys.executable, sys.argv[0], 'restart']) \ No newline at end of file