Add installation notes, channel options

This commit is contained in:
Talor Berthelson
2021-07-21 10:32:53 -04:00
parent c2835b6d9a
commit 243e288f37
5 changed files with 37 additions and 1 deletions

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@ config.json
themeparks.db themeparks.db
themeparks.db themeparks.db
*.db *.db
node_modules/
package-lock.json

View File

@@ -1,2 +1,19 @@
# Parkscord # Parkscord
Discord bot to display Theme Park queue times. 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`

12
package.json Normal file
View File

@@ -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"
}
}

View File

@@ -21,7 +21,7 @@ for (const park in ThemeParks.Parks) {
client.on("ready", () => { client.on("ready", () => {
console.log(`Logged in as ${client.user.tag}!`); console.log(`Logged in as ${client.user.tag}!`);
}); });
var goodchannel = "bot_commands"; var goodchannel = config.channel;
client.on("message", (msg) => { client.on("message", (msg) => {
if (msg.channel.name !== goodchannel) return; if (msg.channel.name !== goodchannel) return;
else { else {

5
sample_config.json Normal file
View File

@@ -0,0 +1,5 @@
{
"prefix": "!q ",
"token": "discord_bot_token",
"channel": "channel_name"
}