I read somewhere in the docs that infinite loops are possible. Does that mean I can leave a script running for weeks? Such as a bot?
Infinite loops are not allowed on repl.it if I recall correctly. Repl.it scripts stop after somewhat between 30 minutes to 1 hour of inactivity.
You can leave a script running for long amounts of time by setting up a HTTP web server and then pinging the repl every 30 minutes or something like that using uptimerobot or @Kognise 's pinging tool.
@freshcoder running for that long continuously won't be possible. There will be slight downtime. The way I suggested would bring it back online after it goes down. Although it will try to prevent it from going down in the first place. The only way to keep a script running that long would be by hosting it yourself or using a vps.