From the documentation of discord.py, you first need to fetch the channel by its id and then you can send a message. Hope, this helps.