Skip to content

Commit

Permalink
chore: add log for restarting
Browse files Browse the repository at this point in the history
  • Loading branch information
progmatic-99 committed Mar 31, 2024
1 parent e90e5ea commit b21d04d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
filters,
)

from logger import logger
from config import bot_token
from commands import COMMANDS
from handlers import (
Expand Down Expand Up @@ -81,6 +82,7 @@ def main() -> None:
application.run_polling(allowed_updates=Update.ALL_TYPES)

if application.bot_data["restart"]:
logger.info("Restarting the bot!!!")
os.execl(sys.executable, sys.executable, *sys.argv)


Expand Down

0 comments on commit b21d04d

Please sign in to comment.