Skip to content

Commit 50fcf66

Browse files
authored
Prevent error when statuspage env vars are not set (#93)
# Remove need for statuspage env vars Fixes an issue where if you try to run the bot without statuspage variables set and the bot is not in a docker container, it will throw an error # Changes - simply return if either of the statuspage env vars are not set.
2 parents 4db0ca7 + c00be5e commit 50fcf66

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

features/statuspage.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import { isDocker } from "../utils/docker";
55
export default (client: Client): void => {
66
// Check if the bot is running in a docker container by checking if the env variable UPTIME_KUMA_CONTAINERIZED is true
77
if (isDocker()) return;
8+
if (
9+
!process.env.UPTIME_KUMA_MONITOR_DOMAIN ||
10+
!process.env.UPTIME_KUMA_MONITOR_ID
11+
)
12+
return;
813
const updateStatus = async () => {
914
// This function is called every 1 minutes and pings the network status page for uptime monitoring
1015
await axios.get(

0 commit comments

Comments
 (0)