diff options
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | src/index.ts | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/package.json b/package.json index 01dabf4..a88dbf9 100644 --- a/package.json +++ b/package.json | |||
@@ -5,6 +5,9 @@ | |||
5 | "author": "Volpeon", | 5 | "author": "Volpeon", |
6 | "license": "MIT", | 6 | "license": "MIT", |
7 | "private": true, | 7 | "private": true, |
8 | "scripts": { | ||
9 | "start": "node -r ts-node/register src/index.ts" | ||
10 | }, | ||
8 | "dependencies": { | 11 | "dependencies": { |
9 | "@types/sharp": "^0.29.2", | 12 | "@types/sharp": "^0.29.2", |
10 | "file-type": "^16.5.3", | 13 | "file-type": "^16.5.3", |
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(); |