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!"
from discord.ext import commands
import argparse
import os
import functools