Skip to content
← Back to Community
Is There Any Way I Can Make My Bot Run Forever
Profile icon
CoolCoderz133

Hi, I Was Wondering If One Of You Pro Coders Out There Could Help Me A Bit And Maybe Find A Way For My Bot To Keep Running Even If I Sont Have REPL.IT Open?
Thanks Please Get Back To Me
And If We Want To Chat Add ME On Discord; Mr.Wyatt#3622

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
CoolCoderz133
Comments
hotnewtop
Profile icon
Coder100

Add this to the end of your code:

require("http").createServer((_, res) => res.end("Alive")).listen(8080)

And it will stay online for one hour!

To make it do it forever, copy the new website URL (that's <repl>.<username>.repl.co) and put it into https://ping.matdoes.dev

Profile icon
CoolCoderz133

@Coder100 Thanks!

Profile icon
Coder100
Profile icon
CoolCoderz133
Profile icon
Coder100
Profile icon
Coder100

mark as correct answer? @CoolCoderz133

Profile icon
CoolCoderz133

@Coder100 Defenitly