DEV Community

John Wick
John Wick

Posted on

You're Probably Paying for Something Your Bot Should Just Do Itself

Uptime monitors, restart scripts, status page builders — most bot developers are stitching together three tools for one job. Here's the alternative.

You're Probably Paying for Something Your Bot Should Just Do Itself

Take a minute and count how many separate tools your bot's "reliability setup" actually depends on. An uptime monitor pinging it every five minutes. A restart script you copy-pasted from Stack Overflow two years ago and haven't looked at since. Maybe a status page service you signed up for so you'd stop getting DMs asking if the bot's down. That's three accounts, three dashboards, and in a lot of cases, three separate monthly bills — for one bot.

The stack most developers end up with

It usually happens gradually, not all at once. You start with just the bot. Then it goes down once, so you add an uptime pinger. Then it crashes and doesn't come back, so you write a restart loop. Then people keep asking if it's down, so you set up a status page. None of these decisions were wrong in the moment — but stacked together, you're now maintaining three separate systems, none of which talk to each other, just to keep one bot online.

What if the bot just did all of it

import staypresent

staypresent.run("bot.py")
Enter fullscreen mode Exit fullscreen mode

This single line replaces the restart script (automatic crash recovery, built in), gives your host the always-on signal an uptime monitor exists to fake (a real HTTP port, satisfied automatically), and — as of the newest release — serves an actual status page at /status with uptime history and incident logs, with nothing extra to sign up for.

No dashboards to log into

Your restart logic, your health check, and your status page all live in the same place your bot's code already lives — which means no separate login, no separate outage when that service has a bad day, and no forgetting to renew a plan for a tool you set up eighteen months ago and haven't thought about since.

It costs nothing, on purpose

StayPresent is MIT licensed. Free for personal projects, free for anything you're charging money for, free forever. Not a free tier with a paywall a few months down the line — just genuinely free, the way infrastructure this basic should be.

You built a bot. You shouldn't need a subscription to keep it online.

If your current setup is a Frankenstein of three tools that don't know about each other, it's worth the five minutes to replace all three with one line:

pip install staypresent[prod]
Enter fullscreen mode Exit fullscreen mode

Cancel the monitor. Delete the restart script. Your bot can handle this on its own.

Top comments (0)