You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically what I did is that I ran a file restart.py with an argument which was the channel id and then terminated the bot. Then in restart.py I ran the main file (bot.py) with the same argument and then in bot.py I checked if there was an argument, and if there was one, I would fetch the channel with it and send a message saying "Bot restarted!"
This is a simple way to restart the bot within itself
Basically what I did is that I ran a file restart.py with an argument which was the channel id and then terminated the bot. Then in restart.py I ran the main file (bot.py) with the same argument and then in bot.py I checked if there was an argument, and if there was one, I would fetch the channel with it and send a message saying "Bot restarted!"
Interesting