From 243e288f37999180c7c34ca59ad82962702326c4 Mon Sep 17 00:00:00 2001 From: Talor Berthelson Date: Wed, 21 Jul 2021 10:32:53 -0400 Subject: [PATCH] Add installation notes, channel options --- .gitignore | 2 ++ README.md | 17 +++++++++++++++++ package.json | 12 ++++++++++++ parkscord.js | 2 +- sample_config.json | 5 +++++ 5 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 package.json create mode 100644 sample_config.json diff --git a/.gitignore b/.gitignore index dbfdb3d..856eafc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ config.json themeparks.db themeparks.db *.db +node_modules/ +package-lock.json diff --git a/README.md b/README.md index 52ebd6f..a9968b1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ # Parkscord Discord bot to display Theme Park queue times. +# Installation +You will need Node.js version 16.5.0 or higher installed. I also assume you have git installed. + +Create a discord bot and add it to your server. + +`git clone https://github.com/thewesker/Parkscord` + +`cd Parkscord` + +`npm install` + +Edit config_sample.json, providing your own bot token. Change the channel name (without the #) to the channel you'd like the bot to work in. You may also edit the prefix if you wish. When saving, change the filename to `config.json`. + +`npm start` + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..abce767 --- /dev/null +++ b/package.json @@ -0,0 +1,12 @@ +{ + "name": "Parkscord", + "version": "1.0.0", + "description": "Discord bot to display theme park queue times.", + "scripts": { + "start": "node parkscord.js" + }, + "dependencies": { + "themeparks": "5.1.48", + "discord.js": "12.5.3" + } +} \ No newline at end of file diff --git a/parkscord.js b/parkscord.js index b238b82..6cdc019 100644 --- a/parkscord.js +++ b/parkscord.js @@ -21,7 +21,7 @@ for (const park in ThemeParks.Parks) { client.on("ready", () => { console.log(`Logged in as ${client.user.tag}!`); }); -var goodchannel = "bot_commands"; +var goodchannel = config.channel; client.on("message", (msg) => { if (msg.channel.name !== goodchannel) return; else { diff --git a/sample_config.json b/sample_config.json new file mode 100644 index 0000000..fcf3d7b --- /dev/null +++ b/sample_config.json @@ -0,0 +1,5 @@ +{ + "prefix": "!q ", + "token": "discord_bot_token", + "channel": "channel_name" +} \ No newline at end of file