You heard that right! This ₜᵢₙᵧ addition to your program allows is it stay alive and running indefinitely.
I wanted to be able to have my discord bot stay awake without the use of external ping programs.
Using a small flask server and some threaded pinging loops.
Add the neverSleep.py file to your project and paste the following code to the top of your main.py:
neverSleep.py
main.py
import neverSleep neverSleep.awake('YOUR AUTO GENERATED WEBSITE URL')
That's it!If this gets enough popularity I'll add it to PyPi to make it even easier.
@SixBeeps you technically could put in ANY website (including a node.js repl) and have it keep online.
What?
You heard that right! This ₜᵢₙᵧ addition to your program allows is it stay alive and running indefinitely.
Why?
I wanted to be able to have my discord bot stay awake without the use of external ping programs.
How?
Using a small flask server and some threaded pinging loops.
How do I get started?
Add the
neverSleep.py
file to your project and paste the following code to the top of yourmain.py
:That's it!
If this gets enough popularity I'll add it to PyPi to make it even easier.
@SixBeeps you technically could put in ANY website (including a node.js repl) and have it keep online.