summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-10-17 18:16:13 +0200
committerVolpeon <git@volpeon.ink>2021-10-17 18:16:13 +0200
commitac3ddab720a392e43afb0879b173b7456b3874af (patch)
tree34d0660a2ff36c3608ada97f5be750a9784b1e94 /src
parentInit (diff)
downloadferalbot-ac3ddab720a392e43afb0879b173b7456b3874af.tar.gz
feralbot-ac3ddab720a392e43afb0879b173b7456b3874af.tar.bz2
feralbot-ac3ddab720a392e43afb0879b173b7456b3874af.zip
Detect if Mastodon token is not set
Diffstat (limited to 'src')
-rw-r--r--src/index.ts5
1 files changed, 5 insertions, 0 deletions
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";
3import config from "./config"; 3import config from "./config";
4 4
5(async () => { 5(async () => {
6 if (!config.mastodon.token) {
7 console.error("MASTODON_TOKEN not set");
8 return;
9 }
10
6 console.log("Fetching post..."); 11 console.log("Fetching post...");
7 12
8 const post = await e621.randomPost(); 13 const post = await e621.randomPost();