diff --git a/package.json b/package.json index ba02a835..6b4484df 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ }, "scripts": { "start": "node start.js", + "setup": "node scripts/setup.js", "addbot": "node addbot.js", "test": "cross-env FORCE_COLOR=true supertape --no-check-assertions-count --format tap test/test.js | tap-dot", "test-slow": "cross-env FORCE_COLOR=true supertape --no-check-assertions-count --format tap --no-worker test/test.js -- --slow | tap-dot", diff --git a/readme.md b/readme.md index 992d0dee..daebb1ee 100644 --- a/readme.md +++ b/readme.md @@ -81,9 +81,9 @@ Follow these steps: 1. Install dependencies: `npm install` -1. Run `node scripts/seed.js` to check your setup and set the bot's initial state. It will prompt you for information. You only need to run this once ever. +1. Run `npm run setup` to check your setup and set the bot's initial state. It will prompt you for information. You only need to run this once ever. -1. Start the bridge: `npm start` +1. Start the bridge: `npm run start` 1. Add the bot to a server - use any *one* of the following commands for an invite link: * (in the REPL) `addbot` @@ -152,8 +152,8 @@ To get into the rooms on your Matrix account, use the `/invite [your mxid here]` │   └── *.js * Various files you can run once if you need them. └── scripts - * First time running a new bridge? Run this file to plant a seed, which will flourish into state for the bridge: - ├── seed.js + * First time running a new bridge? Run this file to set up prerequisites on the Matrix server: + ├── setup.js * Hopefully you won't need the rest of these. Code quality varies wildly. └── *.js diff --git a/scripts/seed.js b/scripts/setup.js old mode 100755 new mode 100644 similarity index 99% rename from scripts/seed.js rename to scripts/setup.js index f20afb70..2fb2dd0b --- a/scripts/seed.js +++ b/scripts/setup.js @@ -305,7 +305,7 @@ async function validateHomeserverOrigin(serverUrlPrompt, url) { } // Otherwise, it's the user's problem if (!guild) { - return die(`Error: The bot needs to upload some emojis. Please say where to upload them to. Run seed.js again with --emoji-guild=GUILD_ID`) + return die(`Error: The bot needs to upload some emojis. Please say where to upload them to. Run setup again with --emoji-guild=GUILD_ID`) } // Upload those emojis to the chosen location db.prepare("REPLACE INTO auto_emoji (name, emoji_id, guild_id) VALUES ('_', '_', ?)").run(guild.id)