From ac3ddab720a392e43afb0879b173b7456b3874af Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 17 Oct 2021 18:16:13 +0200 Subject: Detect if Mastodon token is not set --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/index.ts b/src/index.ts index 7185e23..42081e6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,11 @@ import * as mastodon from "./api/mastodon"; import config from "./config"; (async () => { + if (!config.mastodon.token) { + console.error("MASTODON_TOKEN not set"); + return; + } + console.log("Fetching post..."); const post = await e621.randomPost(); -- cgit v1.2.3-70-g09d2