I have a discord.py bot using the datetime and random libraries ( and discord.py of course ). My question  is how can i run it even when my computer is off. I think the answer is a rented server but i think there are cheeper options
You'll either have to run it on a machine you don't turn off. Or deploy it to a server. You can get cheap servers through Linode, Digital Ocean and others.
How do i run a python project nonstop ( even when i close the computer )