diff options
author | Volpeon <git@volpeon.ink> | 2021-10-17 18:16:13 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-10-17 18:16:13 +0200 |
commit | ac3ddab720a392e43afb0879b173b7456b3874af (patch) | |
tree | 34d0660a2ff36c3608ada97f5be750a9784b1e94 /src | |
parent | Init (diff) | |
download | feralbot-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.ts | 5 |
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"; | |||
3 | import config from "./config"; | 3 | import 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(); |